
<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>pymatgen.symmetry.kpath &#8212; pymatgen 2020.7.3 documentation</title>
    <link rel="stylesheet" href="../../../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
    <script src="../../../_static/jquery.js"></script>
    <script src="../../../_static/underscore.js"></script>
    <script src="../../../_static/doctools.js"></script>
    <script src="../../../_static/language_data.js"></script>
    <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" />
 
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-33990148-1']);
  _gaq.push(['_trackPageview']);
</script>

  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">pymatgen 2020.7.3 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../../pymatgen.html" accesskey="U">pymatgen</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">pymatgen.symmetry.kpath</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
          <div class="body" role="main">
            
  <h1>Source code for pymatgen.symmetry.kpath</h1><div class="highlight"><pre>
<span></span><span class="c1"># coding: utf-8</span>
<span class="c1"># Copyright (c) Pymatgen Development Team.</span>
<span class="c1"># Distributed under the terms of the MIT License.</span>

<span class="sd">&quot;&quot;&quot;</span>
<span class="sd">Provides classes for generating high-symmetry k-paths using different conventions.</span>
<span class="sd">&quot;&quot;&quot;</span>

<span class="kn">import</span> <span class="nn">abc</span>
<span class="kn">from</span> <span class="nn">math</span> <span class="kn">import</span> <span class="n">cos</span><span class="p">,</span> <span class="n">sin</span><span class="p">,</span> <span class="n">tan</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="n">pi</span><span class="p">,</span> <span class="n">ceil</span>
<span class="kn">import</span> <span class="nn">itertools</span>
<span class="kn">from</span> <span class="nn">warnings</span> <span class="kn">import</span> <span class="n">warn</span>
<span class="kn">import</span> <span class="nn">operator</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">networkx</span> <span class="k">as</span> <span class="nn">nx</span>
<span class="kn">from</span> <span class="nn">scipy.linalg</span> <span class="kn">import</span> <span class="n">sqrtm</span>
<span class="kn">import</span> <span class="nn">spglib</span>
<span class="kn">from</span> <span class="nn">monty.dev</span> <span class="kn">import</span> <span class="n">requires</span>

<span class="kn">from</span> <span class="nn">pymatgen.core.operations</span> <span class="kn">import</span> <span class="n">SymmOp</span><span class="p">,</span> <span class="n">MagSymmOp</span>
<span class="kn">from</span> <span class="nn">pymatgen.symmetry.analyzer</span> <span class="kn">import</span> <span class="n">SpacegroupAnalyzer</span>

<span class="k">try</span><span class="p">:</span>
    <span class="kn">from</span> <span class="nn">seekpath</span> <span class="kn">import</span> <span class="n">get_path</span>  <span class="c1"># type: ignore</span>
<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
    <span class="n">get_path</span> <span class="o">=</span> <span class="kc">None</span>

<span class="n">__author__</span> <span class="o">=</span> <span class="s2">&quot;Geoffroy Hautier, Katherine Latimer, Jason Munro&quot;</span>
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s2">&quot;Copyright 2020, The Materials Project&quot;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s2">&quot;0.1&quot;</span>
<span class="n">__maintainer__</span> <span class="o">=</span> <span class="s2">&quot;Jason Munro&quot;</span>
<span class="n">__email__</span> <span class="o">=</span> <span class="s2">&quot;jmunro@lbl.gov&quot;</span>
<span class="n">__status__</span> <span class="o">=</span> <span class="s2">&quot;Development&quot;</span>
<span class="n">__date__</span> <span class="o">=</span> <span class="s2">&quot;March 2020&quot;</span>


<div class="viewcode-block" id="KPathBase"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathBase">[docs]</a><span class="k">class</span> <span class="nc">KPathBase</span><span class="p">(</span><span class="n">metaclass</span><span class="o">=</span><span class="n">abc</span><span class="o">.</span><span class="n">ABCMeta</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    This is the base class for classes used to generate high-symmetry</span>
<span class="sd">    paths in reciprocal space (k-paths) for band structure calculations.</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="nd">@abc</span><span class="o">.</span><span class="n">abstractmethod</span>
    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">structure</span><span class="p">,</span> <span class="n">symprec</span><span class="o">=</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="mf">1e-5</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Args:</span>
<span class="sd">        structure (Structure): Structure object</span>
<span class="sd">        symprec (float): Tolerance for symmetry finding</span>
<span class="sd">        angle_tolerance (float): Angle tolerance for symmetry finding.</span>
<span class="sd">        atol (float): Absolute tolerance used to compare structures</span>
<span class="sd">            and determine symmetric equivalence of points and lines</span>
<span class="sd">            in the BZ.</span>
<span class="sd">        &quot;&quot;&quot;</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">_structure</span> <span class="o">=</span> <span class="n">structure</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_latt</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_structure</span><span class="o">.</span><span class="n">lattice</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_structure</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">reciprocal_lattice</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="kc">None</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">_symprec</span> <span class="o">=</span> <span class="n">symprec</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_atol</span> <span class="o">=</span> <span class="n">atol</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_angle_tolerance</span> <span class="o">=</span> <span class="n">angle_tolerance</span>

    <span class="nd">@property</span>
    <span class="k">def</span> <span class="nf">structure</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Returns:</span>
<span class="sd">        The input structure</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_structure</span>

    <span class="nd">@property</span>
    <span class="k">def</span> <span class="nf">lattice</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Returns:</span>
<span class="sd">        The real space lattice</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_latt</span>

    <span class="nd">@property</span>
    <span class="k">def</span> <span class="nf">rec_lattice</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Returns:</span>
<span class="sd">        The reciprocal space lattice</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span>

    <span class="nd">@property</span>
    <span class="k">def</span> <span class="nf">kpath</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Returns:</span>
<span class="sd">        The symmetry line path in reciprocal space</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span>

<div class="viewcode-block" id="KPathBase.get_kpoints"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathBase.get_kpoints">[docs]</a>    <span class="k">def</span> <span class="nf">get_kpoints</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">line_density</span><span class="o">=</span><span class="mi">20</span><span class="p">,</span> <span class="n">coords_are_cartesian</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Returns:</span>
<span class="sd">        the kpoints along the paths in cartesian coordinates</span>
<span class="sd">        together with the labels for symmetry points -Wei.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">list_k_points</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">sym_point_labels</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="k">for</span> <span class="n">b</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">kpath</span><span class="p">[</span><span class="s2">&quot;path&quot;</span><span class="p">]:</span>
            <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">b</span><span class="p">)):</span>
                <span class="n">start</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">kpath</span><span class="p">[</span><span class="s2">&quot;kpoints&quot;</span><span class="p">][</span><span class="n">b</span><span class="p">[</span><span class="n">i</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]])</span>
                <span class="n">end</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">kpath</span><span class="p">[</span><span class="s2">&quot;kpoints&quot;</span><span class="p">][</span><span class="n">b</span><span class="p">[</span><span class="n">i</span><span class="p">]])</span>
                <span class="n">distance</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">norm</span><span class="p">(</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">get_cartesian_coords</span><span class="p">(</span><span class="n">start</span><span class="p">)</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">get_cartesian_coords</span><span class="p">(</span><span class="n">end</span><span class="p">)</span>
                <span class="p">)</span>
                <span class="n">nb</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">ceil</span><span class="p">(</span><span class="n">distance</span> <span class="o">*</span> <span class="n">line_density</span><span class="p">))</span>
                <span class="k">if</span> <span class="n">nb</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
                    <span class="k">continue</span>
                <span class="n">sym_point_labels</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span><span class="n">b</span><span class="p">[</span><span class="n">i</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]]</span> <span class="o">+</span> <span class="p">[</span><span class="s2">&quot;&quot;</span><span class="p">]</span> <span class="o">*</span> <span class="p">(</span><span class="n">nb</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="p">[</span><span class="n">b</span><span class="p">[</span><span class="n">i</span><span class="p">]])</span>
                <span class="n">list_k_points</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span>
                    <span class="p">[</span>
                        <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">get_cartesian_coords</span><span class="p">(</span><span class="n">start</span><span class="p">)</span>
                        <span class="o">+</span> <span class="nb">float</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
                        <span class="o">/</span> <span class="nb">float</span><span class="p">(</span><span class="n">nb</span><span class="p">)</span>
                        <span class="o">*</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">get_cartesian_coords</span><span class="p">(</span><span class="n">end</span><span class="p">)</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">get_cartesian_coords</span><span class="p">(</span><span class="n">start</span><span class="p">))</span>
                        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">nb</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
                    <span class="p">]</span>
                <span class="p">)</span>
        <span class="k">if</span> <span class="n">coords_are_cartesian</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">list_k_points</span><span class="p">,</span> <span class="n">sym_point_labels</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="n">frac_k_points</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">get_fractional_coords</span><span class="p">(</span><span class="n">k</span><span class="p">)</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">list_k_points</span><span class="p">]</span>
            <span class="k">return</span> <span class="n">frac_k_points</span><span class="p">,</span> <span class="n">sym_point_labels</span></div></div>


<div class="viewcode-block" id="KPathSetyawanCurtarolo"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo">[docs]</a><span class="k">class</span> <span class="nc">KPathSetyawanCurtarolo</span><span class="p">(</span><span class="n">KPathBase</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    This class looks for path along high symmetry lines in</span>
<span class="sd">    the Brillouin Zone.</span>
<span class="sd">    It is based on Setyawan, W., &amp; Curtarolo, S. (2010).</span>
<span class="sd">    High-throughput electronic band structure calculations:</span>
<span class="sd">    Challenges and tools. Computational Materials Science,</span>
<span class="sd">    49(2), 299-312. doi:10.1016/j.commatsci.2010.05.010</span>
<span class="sd">    It should be used with primitive structures that</span>
<span class="sd">    comply with the definition from the paper.</span>
<span class="sd">    The symmetry is determined by spglib through the</span>
<span class="sd">    SpacegroupAnalyzer class. The analyzer can be used to</span>
<span class="sd">    produce the correct primitive structure (method</span>
<span class="sd">    get_primitive_standard_structure(international_monoclinic=False)).</span>
<span class="sd">    A warning will signal possible compatibility problems</span>
<span class="sd">    with the given structure. KPoints from get_kpoints() method</span>
<span class="sd">    are returned in the reciprocal cell basis defined in the paper.</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">structure</span><span class="p">,</span> <span class="n">symprec</span><span class="o">=</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="mf">1e-5</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">            Args:</span>
<span class="sd">            structure (Structure): Structure object</span>
<span class="sd">            symprec (float): Tolerance for symmetry finding</span>
<span class="sd">            angle_tolerance (float): Angle tolerance for symmetry finding.</span>
<span class="sd">            atol (float): Absolute tolerance used to compare the input</span>
<span class="sd">                structure with the one expected as primitive standard.</span>
<span class="sd">                A warning will be issued if the lattices don&#39;t match.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">if</span> <span class="s2">&quot;magmom&quot;</span> <span class="ow">in</span> <span class="n">structure</span><span class="o">.</span><span class="n">site_properties</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
            <span class="n">warn</span><span class="p">(</span>
                <span class="s2">&quot;&#39;magmom&#39; entry found in site properties but will be ignored </span><span class="se">\</span>
<span class="s2">                  for the Setyawan and Curtarolo convention.&quot;</span>
            <span class="p">)</span>

        <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">structure</span><span class="p">,</span> <span class="n">symprec</span><span class="o">=</span><span class="n">symprec</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="o">=</span><span class="n">angle_tolerance</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">)</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">_sym</span> <span class="o">=</span> <span class="n">SpacegroupAnalyzer</span><span class="p">(</span><span class="n">structure</span><span class="p">,</span> <span class="n">symprec</span><span class="o">=</span><span class="n">symprec</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="o">=</span><span class="n">angle_tolerance</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_prim</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_sym</span><span class="o">.</span><span class="n">get_primitive_standard_structure</span><span class="p">(</span><span class="n">international_monoclinic</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_conv</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_sym</span><span class="o">.</span><span class="n">get_conventional_standard_structure</span><span class="p">(</span><span class="n">international_monoclinic</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prim</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">reciprocal_lattice</span>

        <span class="c1"># Note: this warning will be issued for space groups 38-41, since the primitive cell must be</span>
        <span class="c1"># reformatted to match Setyawan/Curtarolo convention in order to work with the current k-path</span>
        <span class="c1"># generation scheme.</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_structure</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">matrix</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prim</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">matrix</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
            <span class="n">warn</span><span class="p">(</span>
                <span class="s2">&quot;The input structure does not match the expected standard primitive! &quot;</span>
                <span class="s2">&quot;The path can be incorrect. Use at your own risk.&quot;</span>
            <span class="p">)</span>

        <span class="n">lattice_type</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_sym</span><span class="o">.</span><span class="n">get_lattice_type</span><span class="p">()</span>
        <span class="n">spg_symbol</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_sym</span><span class="o">.</span><span class="n">get_space_group_symbol</span><span class="p">()</span>

        <span class="k">if</span> <span class="n">lattice_type</span> <span class="o">==</span> <span class="s2">&quot;cubic&quot;</span><span class="p">:</span>
            <span class="k">if</span> <span class="s2">&quot;P&quot;</span> <span class="ow">in</span> <span class="n">spg_symbol</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">cubic</span><span class="p">()</span>
            <span class="k">elif</span> <span class="s2">&quot;F&quot;</span> <span class="ow">in</span> <span class="n">spg_symbol</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">fcc</span><span class="p">()</span>
            <span class="k">elif</span> <span class="s2">&quot;I&quot;</span> <span class="ow">in</span> <span class="n">spg_symbol</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">bcc</span><span class="p">()</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">warn</span><span class="p">(</span><span class="s2">&quot;Unexpected value for spg_symbol: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">spg_symbol</span><span class="p">)</span>

        <span class="k">elif</span> <span class="n">lattice_type</span> <span class="o">==</span> <span class="s2">&quot;tetragonal&quot;</span><span class="p">:</span>
            <span class="k">if</span> <span class="s2">&quot;P&quot;</span> <span class="ow">in</span> <span class="n">spg_symbol</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">tet</span><span class="p">()</span>
            <span class="k">elif</span> <span class="s2">&quot;I&quot;</span> <span class="ow">in</span> <span class="n">spg_symbol</span><span class="p">:</span>
                <span class="n">a</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_conv</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">abc</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
                <span class="n">c</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_conv</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">abc</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
                <span class="k">if</span> <span class="n">c</span> <span class="o">&lt;</span> <span class="n">a</span><span class="p">:</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">bctet1</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">a</span><span class="p">)</span>
                <span class="k">else</span><span class="p">:</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">bctet2</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">a</span><span class="p">)</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">warn</span><span class="p">(</span><span class="s2">&quot;Unexpected value for spg_symbol: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">spg_symbol</span><span class="p">)</span>

        <span class="k">elif</span> <span class="n">lattice_type</span> <span class="o">==</span> <span class="s2">&quot;orthorhombic&quot;</span><span class="p">:</span>
            <span class="n">a</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_conv</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">abc</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
            <span class="n">b</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_conv</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">abc</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
            <span class="n">c</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_conv</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">abc</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>

            <span class="k">if</span> <span class="s2">&quot;P&quot;</span> <span class="ow">in</span> <span class="n">spg_symbol</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">orc</span><span class="p">()</span>

            <span class="k">elif</span> <span class="s2">&quot;F&quot;</span> <span class="ow">in</span> <span class="n">spg_symbol</span><span class="p">:</span>
                <span class="k">if</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">&gt;</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">+</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">:</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">orcf1</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
                <span class="k">elif</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">&lt;</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">+</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">:</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">orcf2</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
                <span class="k">else</span><span class="p">:</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">orcf3</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>

            <span class="k">elif</span> <span class="s2">&quot;I&quot;</span> <span class="ow">in</span> <span class="n">spg_symbol</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">orci</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>

            <span class="k">elif</span> <span class="s2">&quot;C&quot;</span> <span class="ow">in</span> <span class="n">spg_symbol</span> <span class="ow">or</span> <span class="s2">&quot;A&quot;</span> <span class="ow">in</span> <span class="n">spg_symbol</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">orcc</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">warn</span><span class="p">(</span><span class="s2">&quot;Unexpected value for spg_symbol: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">spg_symbol</span><span class="p">)</span>

        <span class="k">elif</span> <span class="n">lattice_type</span> <span class="o">==</span> <span class="s2">&quot;hexagonal&quot;</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">hex</span><span class="p">()</span>

        <span class="k">elif</span> <span class="n">lattice_type</span> <span class="o">==</span> <span class="s2">&quot;rhombohedral&quot;</span><span class="p">:</span>
            <span class="n">alpha</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prim</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">parameters</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span>
            <span class="k">if</span> <span class="n">alpha</span> <span class="o">&lt;</span> <span class="mi">90</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">rhl1</span><span class="p">(</span><span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">rhl2</span><span class="p">(</span><span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span>

        <span class="k">elif</span> <span class="n">lattice_type</span> <span class="o">==</span> <span class="s2">&quot;monoclinic&quot;</span><span class="p">:</span>
            <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_conv</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">abc</span>
            <span class="n">alpha</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_conv</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">parameters</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span>
            <span class="c1"># beta = self._conv.lattice.parameters[4]</span>

            <span class="k">if</span> <span class="s2">&quot;P&quot;</span> <span class="ow">in</span> <span class="n">spg_symbol</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mcl</span><span class="p">(</span><span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span>

            <span class="k">elif</span> <span class="s2">&quot;C&quot;</span> <span class="ow">in</span> <span class="n">spg_symbol</span><span class="p">:</span>
                <span class="n">kgamma</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">parameters</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span>
                <span class="k">if</span> <span class="n">kgamma</span> <span class="o">&gt;</span> <span class="mi">90</span><span class="p">:</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mclc1</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span>
                <span class="k">if</span> <span class="n">kgamma</span> <span class="o">==</span> <span class="mi">90</span><span class="p">:</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mclc2</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span>
                <span class="k">if</span> <span class="n">kgamma</span> <span class="o">&lt;</span> <span class="mi">90</span><span class="p">:</span>
                    <span class="k">if</span> <span class="n">b</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span> <span class="o">/</span> <span class="n">c</span> <span class="o">+</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">sin</span><span class="p">(</span><span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">&lt;</span> <span class="mi">1</span><span class="p">:</span>
                        <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mclc3</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span>
                    <span class="k">if</span> <span class="n">b</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span> <span class="o">/</span> <span class="n">c</span> <span class="o">+</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">sin</span><span class="p">(</span><span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
                        <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mclc4</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span>
                    <span class="k">if</span> <span class="n">b</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span> <span class="o">/</span> <span class="n">c</span> <span class="o">+</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">sin</span><span class="p">(</span><span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
                        <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mclc5</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">/</span> <span class="mi">180</span><span class="p">)</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">warn</span><span class="p">(</span><span class="s2">&quot;Unexpected value for spg_symbol: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">spg_symbol</span><span class="p">)</span>

        <span class="k">elif</span> <span class="n">lattice_type</span> <span class="o">==</span> <span class="s2">&quot;triclinic&quot;</span><span class="p">:</span>
            <span class="n">kalpha</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">parameters</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span>
            <span class="n">kbeta</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">parameters</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span>
            <span class="n">kgamma</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">parameters</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span>
            <span class="k">if</span> <span class="n">kalpha</span> <span class="o">&gt;</span> <span class="mi">90</span> <span class="ow">and</span> <span class="n">kbeta</span> <span class="o">&gt;</span> <span class="mi">90</span> <span class="ow">and</span> <span class="n">kgamma</span> <span class="o">&gt;</span> <span class="mi">90</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">tria</span><span class="p">()</span>
            <span class="k">if</span> <span class="n">kalpha</span> <span class="o">&lt;</span> <span class="mi">90</span> <span class="ow">and</span> <span class="n">kbeta</span> <span class="o">&lt;</span> <span class="mi">90</span> <span class="ow">and</span> <span class="n">kgamma</span> <span class="o">&lt;</span> <span class="mi">90</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">trib</span><span class="p">()</span>
            <span class="k">if</span> <span class="n">kalpha</span> <span class="o">&gt;</span> <span class="mi">90</span> <span class="ow">and</span> <span class="n">kbeta</span> <span class="o">&gt;</span> <span class="mi">90</span> <span class="ow">and</span> <span class="n">kgamma</span> <span class="o">==</span> <span class="mi">90</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">tria</span><span class="p">()</span>
            <span class="k">if</span> <span class="n">kalpha</span> <span class="o">&lt;</span> <span class="mi">90</span> <span class="ow">and</span> <span class="n">kbeta</span> <span class="o">&lt;</span> <span class="mi">90</span> <span class="ow">and</span> <span class="n">kgamma</span> <span class="o">==</span> <span class="mi">90</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">trib</span><span class="p">()</span>

        <span class="k">else</span><span class="p">:</span>
            <span class="n">warn</span><span class="p">(</span><span class="s2">&quot;Unknown lattice type </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">lattice_type</span><span class="p">)</span>

    <span class="nd">@property</span>
    <span class="k">def</span> <span class="nf">conventional</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Returns:</span>
<span class="sd">            The conventional cell structure</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_conv</span>

    <span class="nd">@property</span>
    <span class="k">def</span> <span class="nf">prim</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Returns:</span>
<span class="sd">            The primitive cell structure</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prim</span>

    <span class="nd">@property</span>
    <span class="k">def</span> <span class="nf">prim_rec</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Returns:</span>
<span class="sd">            The primitive reciprocal cell structure</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.cubic"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.cubic">[docs]</a>    <span class="k">def</span> <span class="nf">cubic</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        CUB Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;CUB&quot;</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;R&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;M&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;R&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">],</span> <span class="p">[</span><span class="s2">&quot;M&quot;</span><span class="p">,</span> <span class="s2">&quot;R&quot;</span><span class="p">]]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.fcc"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.fcc">[docs]</a>    <span class="k">def</span> <span class="nf">fcc</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        FCC Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;FCC&quot;</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;K&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">3.0</span> <span class="o">/</span> <span class="mf">8.0</span><span class="p">,</span> <span class="mf">3.0</span> <span class="o">/</span> <span class="mf">8.0</span><span class="p">,</span> <span class="mf">3.0</span> <span class="o">/</span> <span class="mf">4.0</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;U&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">5.0</span> <span class="o">/</span> <span class="mf">8.0</span><span class="p">,</span> <span class="mf">1.0</span> <span class="o">/</span> <span class="mf">4.0</span><span class="p">,</span> <span class="mf">5.0</span> <span class="o">/</span> <span class="mf">8.0</span><span class="p">]),</span>
            <span class="s2">&quot;W&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">1.0</span> <span class="o">/</span> <span class="mf">4.0</span><span class="p">,</span> <span class="mf">3.0</span> <span class="o">/</span> <span class="mf">4.0</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;W&quot;</span><span class="p">,</span> <span class="s2">&quot;K&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;U&quot;</span><span class="p">,</span> <span class="s2">&quot;W&quot;</span><span class="p">,</span> <span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;K&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;U&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.bcc"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.bcc">[docs]</a>    <span class="k">def</span> <span class="nf">bcc</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        BCC Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;BCC&quot;</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;H&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;P&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.25</span><span class="p">,</span> <span class="mf">0.25</span><span class="p">,</span> <span class="mf">0.25</span><span class="p">]),</span>
            <span class="s2">&quot;N&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;H&quot;</span><span class="p">,</span> <span class="s2">&quot;N&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;P&quot;</span><span class="p">,</span> <span class="s2">&quot;H&quot;</span><span class="p">],</span> <span class="p">[</span><span class="s2">&quot;P&quot;</span><span class="p">,</span> <span class="s2">&quot;N&quot;</span><span class="p">]]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.tet"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.tet">[docs]</a>    <span class="k">def</span> <span class="nf">tet</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        TET Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;TET&quot;</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;A&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;R&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;M&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;R&quot;</span><span class="p">,</span> <span class="s2">&quot;A&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;R&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;M&quot;</span><span class="p">,</span> <span class="s2">&quot;A&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.bctet1"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.bctet1">[docs]</a>    <span class="k">def</span> <span class="nf">bctet1</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">a</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        BCT1 Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;BCT1&quot;</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mf">4.0</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;N&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;P&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.25</span><span class="p">,</span> <span class="mf">0.25</span><span class="p">,</span> <span class="mf">0.25</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">eta</span><span class="p">,</span> <span class="n">eta</span><span class="p">,</span> <span class="o">-</span><span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;Z_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">eta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">,</span> <span class="n">eta</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;M&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;P&quot;</span><span class="p">,</span> <span class="s2">&quot;N&quot;</span><span class="p">,</span> <span class="s2">&quot;Z_1&quot;</span><span class="p">,</span> <span class="s2">&quot;M&quot;</span><span class="p">],</span> <span class="p">[</span><span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;P&quot;</span><span class="p">]]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.bctet2"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.bctet2">[docs]</a>    <span class="k">def</span> <span class="nf">bctet2</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">a</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        BCT2 Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;BCT2&quot;</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mf">4.0</span>
        <span class="n">zeta</span> <span class="o">=</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="p">(</span><span class="mi">2</span> <span class="o">*</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;N&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;P&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.25</span><span class="p">,</span> <span class="mf">0.25</span><span class="p">,</span> <span class="mf">0.25</span><span class="p">]),</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Sigma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">eta</span><span class="p">,</span> <span class="n">eta</span><span class="p">,</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Sigma_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">eta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">,</span> <span class="o">-</span><span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="n">zeta</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;Y_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="n">zeta</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Sigma&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Sigma_1&quot;</span><span class="p">,</span> <span class="s2">&quot;N&quot;</span><span class="p">,</span> <span class="s2">&quot;P&quot;</span><span class="p">,</span> <span class="s2">&quot;Y_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">],</span> <span class="p">[</span><span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;P&quot;</span><span class="p">]]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.orc"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.orc">[docs]</a>    <span class="k">def</span> <span class="nf">orc</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        ORC Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;ORC&quot;</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;R&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;S&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;T&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;U&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;S&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;U&quot;</span><span class="p">,</span> <span class="s2">&quot;R&quot;</span><span class="p">,</span> <span class="s2">&quot;T&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;T&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;U&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;S&quot;</span><span class="p">,</span> <span class="s2">&quot;R&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.orcf1"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.orcf1">[docs]</a>    <span class="k">def</span> <span class="nf">orcf1</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        ORFC1 Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;ORCF1&quot;</span>
        <span class="n">zeta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">-</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mi">4</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">+</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mi">4</span>

        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;A&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span> <span class="o">+</span> <span class="n">zeta</span><span class="p">,</span> <span class="n">zeta</span><span class="p">]),</span>
            <span class="s2">&quot;A_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;T&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">eta</span><span class="p">,</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;X_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;T&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;A_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;T&quot;</span><span class="p">,</span> <span class="s2">&quot;X_1&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;A&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.orcf2"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.orcf2">[docs]</a>    <span class="k">def</span> <span class="nf">orcf2</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        ORFC2 Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;ORCF2&quot;</span>
        <span class="n">phi</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">-</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mi">4</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">-</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mi">4</span>
        <span class="n">delta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">-</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mi">4</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;C&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span> <span class="o">-</span> <span class="n">eta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;C_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span> <span class="o">+</span> <span class="n">eta</span><span class="p">,</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;D&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span> <span class="o">-</span> <span class="n">delta</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;D_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span> <span class="o">+</span> <span class="n">delta</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;H&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">phi</span><span class="p">,</span> <span class="mf">0.5</span> <span class="o">-</span> <span class="n">phi</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;H_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">phi</span><span class="p">,</span> <span class="mf">0.5</span> <span class="o">+</span> <span class="n">phi</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;C&quot;</span><span class="p">,</span> <span class="s2">&quot;D&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;D_1&quot;</span><span class="p">,</span> <span class="s2">&quot;H&quot;</span><span class="p">,</span> <span class="s2">&quot;C&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;C_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;H_1&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;H&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.orcf3"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.orcf3">[docs]</a>    <span class="k">def</span> <span class="nf">orcf3</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        ORFC3 Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;ORCF3&quot;</span>
        <span class="n">zeta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">-</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mi">4</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">+</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mi">4</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;A&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span> <span class="o">+</span> <span class="n">zeta</span><span class="p">,</span> <span class="n">zeta</span><span class="p">]),</span>
            <span class="s2">&quot;A_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;T&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">eta</span><span class="p">,</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;X_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;T&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;A_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;A&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.orci"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.orci">[docs]</a>    <span class="k">def</span> <span class="nf">orci</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        ORCI Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;ORCI&quot;</span>
        <span class="n">zeta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mi">4</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mi">4</span>
        <span class="n">delta</span> <span class="o">=</span> <span class="p">(</span><span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">-</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">mu</span> <span class="o">=</span> <span class="p">(</span><span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">+</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">c</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">mu</span><span class="p">,</span> <span class="n">mu</span><span class="p">,</span> <span class="mf">0.5</span> <span class="o">-</span> <span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;L_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">mu</span><span class="p">,</span> <span class="mf">0.5</span> <span class="o">+</span> <span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;L_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span> <span class="o">-</span> <span class="n">delta</span><span class="p">,</span> <span class="mf">0.5</span> <span class="o">+</span> <span class="n">delta</span><span class="p">,</span> <span class="o">-</span><span class="n">mu</span><span class="p">]),</span>
            <span class="s2">&quot;R&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;S&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;T&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;W&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.25</span><span class="p">,</span> <span class="mf">0.25</span><span class="p">,</span> <span class="mf">0.25</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="n">zeta</span><span class="p">,</span> <span class="n">zeta</span><span class="p">]),</span>
            <span class="s2">&quot;X_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="o">-</span><span class="n">zeta</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">eta</span><span class="p">,</span> <span class="o">-</span><span class="n">eta</span><span class="p">,</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;Y_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">,</span> <span class="n">eta</span><span class="p">,</span> <span class="o">-</span><span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;T&quot;</span><span class="p">,</span> <span class="s2">&quot;W&quot;</span><span class="p">,</span> <span class="s2">&quot;R&quot;</span><span class="p">,</span> <span class="s2">&quot;X_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;S&quot;</span><span class="p">,</span> <span class="s2">&quot;W&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;L_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;Y_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.orcc"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.orcc">[docs]</a>    <span class="k">def</span> <span class="nf">orcc</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        ORCC Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;ORCC&quot;</span>
        <span class="n">zeta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mi">4</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;A&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">zeta</span><span class="p">,</span> <span class="n">zeta</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;A_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;R&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;S&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;T&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">zeta</span><span class="p">,</span> <span class="n">zeta</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;X_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mi">0</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;S&quot;</span><span class="p">,</span> <span class="s2">&quot;R&quot;</span><span class="p">,</span> <span class="s2">&quot;A&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;X_1&quot;</span><span class="p">,</span> <span class="s2">&quot;A_1&quot;</span><span class="p">,</span> <span class="s2">&quot;T&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">],</span> <span class="p">[</span><span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;T&quot;</span><span class="p">]]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.hex"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.hex">[docs]</a>    <span class="k">def</span> <span class="nf">hex</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        HEX Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;HEX&quot;</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;A&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;H&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">1.0</span> <span class="o">/</span> <span class="mf">3.0</span><span class="p">,</span> <span class="mf">1.0</span> <span class="o">/</span> <span class="mf">3.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;K&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">1.0</span> <span class="o">/</span> <span class="mf">3.0</span><span class="p">,</span> <span class="mf">1.0</span> <span class="o">/</span> <span class="mf">3.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;M&quot;</span><span class="p">,</span> <span class="s2">&quot;K&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;A&quot;</span><span class="p">,</span> <span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;H&quot;</span><span class="p">,</span> <span class="s2">&quot;A&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;M&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;K&quot;</span><span class="p">,</span> <span class="s2">&quot;H&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.rhl1"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.rhl1">[docs]</a>    <span class="k">def</span> <span class="nf">rhl1</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">alpha</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        RHL1 Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;RHL1&quot;</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="mi">4</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">))</span> <span class="o">/</span> <span class="p">(</span><span class="mi">2</span> <span class="o">+</span> <span class="mi">4</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">))</span>
        <span class="n">nu</span> <span class="o">=</span> <span class="mf">3.0</span> <span class="o">/</span> <span class="mf">4.0</span> <span class="o">-</span> <span class="n">eta</span> <span class="o">/</span> <span class="mf">2.0</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;B&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">eta</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">1.0</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;B_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">1.0</span> <span class="o">/</span> <span class="mf">2.0</span><span class="p">,</span> <span class="mf">1.0</span> <span class="o">-</span> <span class="n">eta</span><span class="p">,</span> <span class="n">eta</span> <span class="o">-</span> <span class="mf">1.0</span><span class="p">]),</span>
            <span class="s2">&quot;F&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;L_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;P&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">eta</span><span class="p">,</span> <span class="n">nu</span><span class="p">,</span> <span class="n">nu</span><span class="p">]),</span>
            <span class="s2">&quot;P_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">1.0</span> <span class="o">-</span> <span class="n">nu</span><span class="p">,</span> <span class="mf">1.0</span> <span class="o">-</span> <span class="n">nu</span><span class="p">,</span> <span class="mf">1.0</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;P_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">nu</span><span class="p">,</span> <span class="n">nu</span><span class="p">,</span> <span class="n">eta</span> <span class="o">-</span> <span class="mf">1.0</span><span class="p">]),</span>
            <span class="s2">&quot;Q&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">1.0</span> <span class="o">-</span> <span class="n">nu</span><span class="p">,</span> <span class="n">nu</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">nu</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="o">-</span><span class="n">nu</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;B_1&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;B&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;Q&quot;</span><span class="p">,</span> <span class="s2">&quot;F&quot;</span><span class="p">,</span> <span class="s2">&quot;P_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;P&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.rhl2"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.rhl2">[docs]</a>    <span class="k">def</span> <span class="nf">rhl2</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">alpha</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        RHL2 Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;RHL2&quot;</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">/</span> <span class="p">(</span><span class="mi">2</span> <span class="o">*</span> <span class="n">tan</span><span class="p">(</span><span class="n">alpha</span> <span class="o">/</span> <span class="mf">2.0</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">nu</span> <span class="o">=</span> <span class="mf">3.0</span> <span class="o">/</span> <span class="mf">4.0</span> <span class="o">-</span> <span class="n">eta</span> <span class="o">/</span> <span class="mf">2.0</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;F&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;P&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">nu</span><span class="p">,</span> <span class="o">-</span><span class="n">nu</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">nu</span><span class="p">]),</span>
            <span class="s2">&quot;P_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">nu</span><span class="p">,</span> <span class="n">nu</span> <span class="o">-</span> <span class="mf">1.0</span><span class="p">,</span> <span class="n">nu</span> <span class="o">-</span> <span class="mf">1.0</span><span class="p">]),</span>
            <span class="s2">&quot;Q&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">eta</span><span class="p">,</span> <span class="n">eta</span><span class="p">,</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;Q_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">1.0</span> <span class="o">-</span> <span class="n">eta</span><span class="p">,</span> <span class="o">-</span><span class="n">eta</span><span class="p">,</span> <span class="o">-</span><span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;P&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;Q&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;F&quot;</span><span class="p">,</span> <span class="s2">&quot;P_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Q_1&quot;</span><span class="p">,</span> <span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">]]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.mcl"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.mcl">[docs]</a>    <span class="k">def</span> <span class="nf">mcl</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">beta</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        MCL Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;MCL&quot;</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">b</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">beta</span><span class="p">)</span> <span class="o">/</span> <span class="n">c</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="mi">2</span> <span class="o">*</span> <span class="n">sin</span><span class="p">(</span><span class="n">beta</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">nu</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="o">-</span> <span class="n">eta</span> <span class="o">*</span> <span class="n">c</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">beta</span><span class="p">)</span> <span class="o">/</span> <span class="n">b</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;A&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;C&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;D&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;D_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;E&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;H&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">eta</span><span class="p">,</span> <span class="mf">1.0</span> <span class="o">-</span> <span class="n">nu</span><span class="p">]),</span>
            <span class="s2">&quot;H_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">1.0</span> <span class="o">-</span> <span class="n">eta</span><span class="p">,</span> <span class="n">nu</span><span class="p">]),</span>
            <span class="s2">&quot;H_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">eta</span><span class="p">,</span> <span class="o">-</span><span class="n">nu</span><span class="p">]),</span>
            <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="n">eta</span><span class="p">,</span> <span class="mf">1.0</span> <span class="o">-</span> <span class="n">nu</span><span class="p">]),</span>
            <span class="s2">&quot;M_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">,</span> <span class="n">nu</span><span class="p">]),</span>
            <span class="s2">&quot;M_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">,</span> <span class="n">nu</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;Y_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;H&quot;</span><span class="p">,</span> <span class="s2">&quot;C&quot;</span><span class="p">,</span> <span class="s2">&quot;E&quot;</span><span class="p">,</span> <span class="s2">&quot;M_1&quot;</span><span class="p">,</span> <span class="s2">&quot;A&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;H_1&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;M&quot;</span><span class="p">,</span> <span class="s2">&quot;D&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;D&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.mclc1"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.mclc1">[docs]</a>    <span class="k">def</span> <span class="nf">mclc1</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">alpha</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        MCLC1 Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;MCLC1&quot;</span>
        <span class="n">zeta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">2</span> <span class="o">-</span> <span class="n">b</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">c</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">sin</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="o">+</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">zeta</span> <span class="o">*</span> <span class="n">c</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">b</span>
        <span class="n">psi</span> <span class="o">=</span> <span class="mf">0.75</span> <span class="o">-</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">sin</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">phi</span> <span class="o">=</span> <span class="n">psi</span> <span class="o">+</span> <span class="p">(</span><span class="mf">0.75</span> <span class="o">-</span> <span class="n">psi</span><span class="p">)</span> <span class="o">*</span> <span class="n">b</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">c</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;N&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;N_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;F&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;F_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">zeta</span><span class="p">,</span> <span class="n">zeta</span><span class="p">,</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;F_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;I&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">phi</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">phi</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;I_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">phi</span><span class="p">,</span> <span class="n">phi</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">psi</span><span class="p">,</span> <span class="n">psi</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;X_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">psi</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">psi</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;X_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">psi</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="n">psi</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Y_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;F&quot;</span><span class="p">,</span> <span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;I&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;I_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;F_1&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;X_1&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;N&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;M&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.mclc2"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.mclc2">[docs]</a>    <span class="k">def</span> <span class="nf">mclc2</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">alpha</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        MCLC2 Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;MCLC2&quot;</span>
        <span class="n">zeta</span> <span class="o">=</span> <span class="p">(</span><span class="mi">2</span> <span class="o">-</span> <span class="n">b</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">c</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">sin</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="o">+</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">zeta</span> <span class="o">*</span> <span class="n">c</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">b</span>
        <span class="n">psi</span> <span class="o">=</span> <span class="mf">0.75</span> <span class="o">-</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">sin</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">phi</span> <span class="o">=</span> <span class="n">psi</span> <span class="o">+</span> <span class="p">(</span><span class="mf">0.75</span> <span class="o">-</span> <span class="n">psi</span><span class="p">)</span> <span class="o">*</span> <span class="n">b</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">c</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;N&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;N_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;F&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;F_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">zeta</span><span class="p">,</span> <span class="n">zeta</span><span class="p">,</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;F_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;F_3&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;I&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">phi</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">phi</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;I_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">phi</span><span class="p">,</span> <span class="n">phi</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">psi</span><span class="p">,</span> <span class="n">psi</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;X_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">psi</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">psi</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;X_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">psi</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="n">psi</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Y_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;F&quot;</span><span class="p">,</span> <span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;I&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;I_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;F_1&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;N&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;M&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.mclc3"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.mclc3">[docs]</a>    <span class="k">def</span> <span class="nf">mclc3</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">alpha</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        MCLC3 Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;MCLC3&quot;</span>
        <span class="n">mu</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mf">4.0</span>
        <span class="n">delta</span> <span class="o">=</span> <span class="n">b</span> <span class="o">*</span> <span class="n">c</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="mi">2</span> <span class="o">*</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">zeta</span> <span class="o">=</span> <span class="n">mu</span> <span class="o">-</span> <span class="mf">0.25</span> <span class="o">+</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">b</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">c</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">sin</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="o">+</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">zeta</span> <span class="o">*</span> <span class="n">c</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">b</span>
        <span class="n">phi</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">+</span> <span class="n">zeta</span> <span class="o">-</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">mu</span>
        <span class="n">psi</span> <span class="o">=</span> <span class="n">eta</span> <span class="o">-</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">delta</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;F&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">phi</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">phi</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">psi</span><span class="p">]),</span>
            <span class="s2">&quot;F_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">phi</span><span class="p">,</span> <span class="n">phi</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="n">psi</span><span class="p">]),</span>
            <span class="s2">&quot;F_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">phi</span><span class="p">,</span> <span class="o">-</span><span class="n">phi</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">psi</span><span class="p">]),</span>
            <span class="s2">&quot;H&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">zeta</span><span class="p">,</span> <span class="n">zeta</span><span class="p">,</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;H_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;H_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;I&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;N&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;N_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">mu</span><span class="p">,</span> <span class="n">mu</span><span class="p">,</span> <span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;Y_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;Y_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;Y_3&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">mu</span><span class="p">,</span> <span class="n">mu</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;F&quot;</span><span class="p">,</span> <span class="s2">&quot;H&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;I&quot;</span><span class="p">,</span> <span class="s2">&quot;F_1&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;H_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Y_1&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;N&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;M&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.mclc4"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.mclc4">[docs]</a>    <span class="k">def</span> <span class="nf">mclc4</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">alpha</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        MCLC4 Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;MCLC4&quot;</span>
        <span class="n">mu</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mf">4.0</span>
        <span class="n">delta</span> <span class="o">=</span> <span class="n">b</span> <span class="o">*</span> <span class="n">c</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="mi">2</span> <span class="o">*</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">zeta</span> <span class="o">=</span> <span class="n">mu</span> <span class="o">-</span> <span class="mf">0.25</span> <span class="o">+</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">b</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">c</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">sin</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="o">+</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">zeta</span> <span class="o">*</span> <span class="n">c</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">b</span>
        <span class="n">phi</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">+</span> <span class="n">zeta</span> <span class="o">-</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">mu</span>
        <span class="n">psi</span> <span class="o">=</span> <span class="n">eta</span> <span class="o">-</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">delta</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;F&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">phi</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">phi</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">psi</span><span class="p">]),</span>
            <span class="s2">&quot;F_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">phi</span><span class="p">,</span> <span class="n">phi</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="n">psi</span><span class="p">]),</span>
            <span class="s2">&quot;F_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">phi</span><span class="p">,</span> <span class="o">-</span><span class="n">phi</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">psi</span><span class="p">]),</span>
            <span class="s2">&quot;H&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">zeta</span><span class="p">,</span> <span class="n">zeta</span><span class="p">,</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;H_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;H_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;I&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;N&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;N_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">mu</span><span class="p">,</span> <span class="n">mu</span><span class="p">,</span> <span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;Y_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;Y_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;Y_3&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">mu</span><span class="p">,</span> <span class="n">mu</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;F&quot;</span><span class="p">,</span> <span class="s2">&quot;H&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;I&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;H_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Y_1&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;N&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;M&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.mclc5"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.mclc5">[docs]</a>    <span class="k">def</span> <span class="nf">mclc5</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">alpha</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        MCLC5 Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;MCLC5&quot;</span>
        <span class="n">zeta</span> <span class="o">=</span> <span class="p">(</span><span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">+</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">b</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">c</span><span class="p">)</span> <span class="o">/</span> <span class="n">sin</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mi">4</span>
        <span class="n">eta</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="o">+</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">zeta</span> <span class="o">*</span> <span class="n">c</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">b</span>
        <span class="n">mu</span> <span class="o">=</span> <span class="n">eta</span> <span class="o">/</span> <span class="mi">2</span> <span class="o">+</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">-</span> <span class="n">b</span> <span class="o">*</span> <span class="n">c</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="mi">2</span> <span class="o">*</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="n">nu</span> <span class="o">=</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">mu</span> <span class="o">-</span> <span class="n">zeta</span>
        <span class="n">rho</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span> <span class="o">*</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span>
        <span class="n">omega</span> <span class="o">=</span> <span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">nu</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">b</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">sin</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">**</span> <span class="mi">2</span> <span class="o">/</span> <span class="n">a</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">c</span> <span class="o">/</span> <span class="p">(</span><span class="mi">2</span> <span class="o">*</span> <span class="n">b</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">))</span>
        <span class="n">delta</span> <span class="o">=</span> <span class="n">zeta</span> <span class="o">*</span> <span class="n">c</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">/</span> <span class="n">b</span> <span class="o">+</span> <span class="n">omega</span> <span class="o">/</span> <span class="mi">2</span> <span class="o">-</span> <span class="mf">0.25</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;F&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">nu</span><span class="p">,</span> <span class="n">nu</span><span class="p">,</span> <span class="n">omega</span><span class="p">]),</span>
            <span class="s2">&quot;F_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">nu</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">nu</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">omega</span><span class="p">]),</span>
            <span class="s2">&quot;F_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">nu</span><span class="p">,</span> <span class="n">nu</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="n">omega</span><span class="p">]),</span>
            <span class="s2">&quot;H&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">zeta</span><span class="p">,</span> <span class="n">zeta</span><span class="p">,</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;H_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">zeta</span><span class="p">,</span> <span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;H_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="o">-</span><span class="n">zeta</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">eta</span><span class="p">]),</span>
            <span class="s2">&quot;I&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">rho</span><span class="p">,</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">rho</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;I_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">rho</span><span class="p">,</span> <span class="n">rho</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;N&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;N_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">mu</span><span class="p">,</span> <span class="n">mu</span><span class="p">,</span> <span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;Y_1&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span> <span class="o">-</span> <span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;Y_2&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">mu</span><span class="p">,</span> <span class="o">-</span><span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;Y_3&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">mu</span><span class="p">,</span> <span class="n">mu</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="n">delta</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">,</span> <span class="s2">&quot;F&quot;</span><span class="p">,</span> <span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;I&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;I_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">,</span> <span class="s2">&quot;H&quot;</span><span class="p">,</span> <span class="s2">&quot;F_1&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;H_1&quot;</span><span class="p">,</span> <span class="s2">&quot;Y_1&quot;</span><span class="p">,</span> <span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;N&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;M&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.tria"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.tria">[docs]</a>    <span class="k">def</span> <span class="nf">tria</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        TRI1a Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;TRI1a&quot;</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;N&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;R&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;N&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;M&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;R&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div>

<div class="viewcode-block" id="KPathSetyawanCurtarolo.trib"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSetyawanCurtarolo.trib">[docs]</a>    <span class="k">def</span> <span class="nf">trib</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        TRI1b Path</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;TRI1b&quot;</span>
        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;L&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;M&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;N&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;R&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
            <span class="s2">&quot;X&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Y&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">]),</span>
            <span class="s2">&quot;Z&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]),</span>
        <span class="p">}</span>
        <span class="n">path</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="s2">&quot;X&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Y&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;L&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;Z&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;N&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">,</span> <span class="s2">&quot;M&quot;</span><span class="p">],</span>
            <span class="p">[</span><span class="s2">&quot;R&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\\</span><span class="s2">Gamma&quot;</span><span class="p">],</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span></div></div>


<div class="viewcode-block" id="KPathSeek"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathSeek">[docs]</a><span class="k">class</span> <span class="nc">KPathSeek</span><span class="p">(</span><span class="n">KPathBase</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    This class looks for path along high symmetry lines in</span>
<span class="sd">    the Brillouin Zone.</span>
<span class="sd">    It is based on Hinuma, Y., Pizzi, G., Kumagai, Y., Oba, F.,</span>
<span class="sd">    &amp; Tanaka, I. (2017). Band structure diagram paths based on</span>
<span class="sd">    crystallography. Computational Materials Science, 128, 140–184.</span>
<span class="sd">    https://doi.org/10.1016/j.commatsci.2016.10.015</span>
<span class="sd">    It should be used with primitive structures that</span>
<span class="sd">    comply with the definition from the paper.</span>
<span class="sd">    The symmetry is determined by spglib through the</span>
<span class="sd">    SpacegroupAnalyzer class. KPoints from get_kpoints() method</span>
<span class="sd">    are returned in the reciprocal cell basis defined in the paper.</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="nd">@requires</span><span class="p">(</span><span class="n">get_path</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">,</span> <span class="s2">&quot;SeeK-path is required to use the convention by Hinuma et al.&quot;</span><span class="p">)</span>
    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">structure</span><span class="p">,</span> <span class="n">symprec</span><span class="o">=</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="mf">1e-5</span><span class="p">,</span> <span class="n">system_is_tri</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Args:</span>
<span class="sd">            structure (Structure): Structure object</span>
<span class="sd">            symprec (float): Tolerance for symmetry finding</span>
<span class="sd">            angle_tolerance (float): Angle tolerance for symmetry finding.</span>
<span class="sd">            atol (float): Absolute tolerance used to determine edge cases</span>
<span class="sd">                for settings of structures.</span>
<span class="sd">            system_is_tri (boolean): Indicates if the system is time-reversal</span>
<span class="sd">                invariant.</span>
<span class="sd">        &quot;&quot;&quot;</span>

        <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">structure</span><span class="p">,</span> <span class="n">symprec</span><span class="o">=</span><span class="n">symprec</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="o">=</span><span class="n">angle_tolerance</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">)</span>

        <span class="n">positions</span> <span class="o">=</span> <span class="n">structure</span><span class="o">.</span><span class="n">frac_coords</span>

        <span class="n">sp</span> <span class="o">=</span> <span class="n">structure</span><span class="o">.</span><span class="n">site_properties</span>
        <span class="n">species</span> <span class="o">=</span> <span class="p">[</span><span class="n">site</span><span class="o">.</span><span class="n">species</span> <span class="k">for</span> <span class="n">site</span> <span class="ow">in</span> <span class="n">structure</span><span class="p">]</span>
        <span class="n">site_data</span> <span class="o">=</span> <span class="n">species</span>

        <span class="k">if</span> <span class="ow">not</span> <span class="n">system_is_tri</span><span class="p">:</span>
            <span class="n">warn</span><span class="p">(</span><span class="s2">&quot;Non-zero &#39;magmom&#39; data will be used to define unique atoms in the cell.&quot;</span><span class="p">)</span>
            <span class="n">site_data</span> <span class="o">=</span> <span class="nb">zip</span><span class="p">(</span><span class="n">species</span><span class="p">,</span> <span class="p">[</span><span class="nb">tuple</span><span class="p">(</span><span class="n">vec</span><span class="p">)</span> <span class="k">for</span> <span class="n">vec</span> <span class="ow">in</span> <span class="n">sp</span><span class="p">[</span><span class="s2">&quot;magmom&quot;</span><span class="p">]])</span>

        <span class="n">unique_species</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">numbers</span> <span class="o">=</span> <span class="p">[]</span>

        <span class="k">for</span> <span class="n">species</span><span class="p">,</span> <span class="n">g</span> <span class="ow">in</span> <span class="n">itertools</span><span class="o">.</span><span class="n">groupby</span><span class="p">(</span><span class="n">site_data</span><span class="p">):</span>
            <span class="k">if</span> <span class="n">species</span> <span class="ow">in</span> <span class="n">unique_species</span><span class="p">:</span>
                <span class="n">ind</span> <span class="o">=</span> <span class="n">unique_species</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="n">species</span><span class="p">)</span>
                <span class="n">numbers</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span><span class="n">ind</span> <span class="o">+</span> <span class="mi">1</span><span class="p">]</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="nb">tuple</span><span class="p">(</span><span class="n">g</span><span class="p">)))</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">unique_species</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">species</span><span class="p">)</span>
                <span class="n">numbers</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span><span class="nb">len</span><span class="p">(</span><span class="n">unique_species</span><span class="p">)]</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="nb">tuple</span><span class="p">(</span><span class="n">g</span><span class="p">)))</span>

        <span class="n">cell</span> <span class="o">=</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_latt</span><span class="o">.</span><span class="n">matrix</span><span class="p">,</span> <span class="n">positions</span><span class="p">,</span> <span class="n">numbers</span><span class="p">)</span>

        <span class="n">lattice</span><span class="p">,</span> <span class="n">scale_pos</span><span class="p">,</span> <span class="n">atom_num</span> <span class="o">=</span> <span class="n">spglib</span><span class="o">.</span><span class="n">standardize_cell</span><span class="p">(</span>
            <span class="n">cell</span><span class="p">,</span> <span class="n">to_primitive</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">no_idealize</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">symprec</span><span class="o">=</span><span class="n">symprec</span>
        <span class="p">)</span>

        <span class="n">spg_struct</span> <span class="o">=</span> <span class="p">(</span><span class="n">lattice</span><span class="p">,</span> <span class="n">scale_pos</span><span class="p">,</span> <span class="n">atom_num</span><span class="p">)</span>
        <span class="n">spath_dat</span> <span class="o">=</span> <span class="n">get_path</span><span class="p">(</span><span class="n">spg_struct</span><span class="p">,</span> <span class="n">system_is_tri</span><span class="p">,</span> <span class="s2">&quot;hpkot&quot;</span><span class="p">,</span> <span class="n">atol</span><span class="p">,</span> <span class="n">symprec</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="p">)</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">_tmat</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_trans_sc_to_Hin</span><span class="p">(</span><span class="n">spath_dat</span><span class="p">[</span><span class="s2">&quot;bravais_lattice_extended&quot;</span><span class="p">])</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span> <span class="o">=</span> <span class="n">spath_dat</span><span class="p">[</span><span class="s2">&quot;reciprocal_primitive_lattice&quot;</span><span class="p">]</span>

        <span class="n">spath_data_formatted</span> <span class="o">=</span> <span class="p">[[</span><span class="n">spath_dat</span><span class="p">[</span><span class="s2">&quot;path&quot;</span><span class="p">][</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">]]]</span>
        <span class="n">count</span> <span class="o">=</span> <span class="mi">0</span>
        <span class="k">for</span> <span class="n">pnum</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">spath_dat</span><span class="p">[</span><span class="s2">&quot;path&quot;</span><span class="p">])</span> <span class="o">-</span> <span class="mi">1</span><span class="p">):</span>
            <span class="k">if</span> <span class="n">spath_dat</span><span class="p">[</span><span class="s2">&quot;path&quot;</span><span class="p">][</span><span class="n">pnum</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="n">spath_dat</span><span class="p">[</span><span class="s2">&quot;path&quot;</span><span class="p">][</span><span class="n">pnum</span> <span class="o">+</span> <span class="mi">1</span><span class="p">][</span><span class="mi">0</span><span class="p">]:</span>
                <span class="n">spath_data_formatted</span><span class="p">[</span><span class="n">count</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">spath_dat</span><span class="p">[</span><span class="s2">&quot;path&quot;</span><span class="p">][</span><span class="n">pnum</span><span class="p">][</span><span class="mi">1</span><span class="p">])</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">spath_data_formatted</span><span class="p">[</span><span class="n">count</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">spath_dat</span><span class="p">[</span><span class="s2">&quot;path&quot;</span><span class="p">][</span><span class="n">pnum</span><span class="p">][</span><span class="mi">1</span><span class="p">])</span>
                <span class="n">spath_data_formatted</span><span class="o">.</span><span class="n">append</span><span class="p">([])</span>
                <span class="n">count</span> <span class="o">+=</span> <span class="mi">1</span>
                <span class="n">spath_data_formatted</span><span class="p">[</span><span class="n">count</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">spath_dat</span><span class="p">[</span><span class="s2">&quot;path&quot;</span><span class="p">][</span><span class="n">pnum</span> <span class="o">+</span> <span class="mi">1</span><span class="p">][</span><span class="mi">0</span><span class="p">])</span>

        <span class="n">spath_data_formatted</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">spath_dat</span><span class="p">[</span><span class="s2">&quot;path&quot;</span><span class="p">][</span><span class="o">-</span><span class="mi">1</span><span class="p">][</span><span class="mi">1</span><span class="p">])</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">spath_dat</span><span class="p">[</span><span class="s2">&quot;point_coords&quot;</span><span class="p">],</span>
            <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">spath_data_formatted</span><span class="p">,</span>
        <span class="p">}</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_trans_sc_to_Hin</span><span class="p">(</span><span class="n">sub_class</span><span class="p">):</span>

        <span class="k">if</span> <span class="n">sub_class</span> <span class="ow">in</span> <span class="p">[</span>
                <span class="s2">&quot;cP1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;cP2&quot;</span><span class="p">,</span>
                <span class="s2">&quot;cF1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;cF2&quot;</span><span class="p">,</span>
                <span class="s2">&quot;cI1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;tP1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;oP1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;hP1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;hP2&quot;</span><span class="p">,</span>
                <span class="s2">&quot;tI1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;tI2&quot;</span><span class="p">,</span>
                <span class="s2">&quot;oF1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;oF3&quot;</span><span class="p">,</span>
                <span class="s2">&quot;oI1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;oI3&quot;</span><span class="p">,</span>
                <span class="s2">&quot;oC1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;hR1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;hR2&quot;</span><span class="p">,</span>
                <span class="s2">&quot;aP1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;aP2&quot;</span><span class="p">,</span>
                <span class="s2">&quot;aP3&quot;</span><span class="p">,</span>
                <span class="s2">&quot;oA1&quot;</span><span class="p">]:</span>
            <span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">eye</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
        <span class="k">elif</span> <span class="n">sub_class</span> <span class="o">==</span> <span class="s2">&quot;oF2&quot;</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">]])</span>
        <span class="k">elif</span> <span class="n">sub_class</span> <span class="o">==</span> <span class="s2">&quot;oI2&quot;</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">]])</span>
        <span class="k">elif</span> <span class="n">sub_class</span> <span class="o">==</span> <span class="s2">&quot;oI3&quot;</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">]])</span>
        <span class="k">elif</span> <span class="n">sub_class</span> <span class="o">==</span> <span class="s2">&quot;oA2&quot;</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">]])</span>
        <span class="k">elif</span> <span class="n">sub_class</span> <span class="o">==</span> <span class="s2">&quot;oC2&quot;</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">]])</span>
        <span class="k">elif</span> <span class="n">sub_class</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;mP1&quot;</span><span class="p">,</span> <span class="s2">&quot;mC1&quot;</span><span class="p">,</span> <span class="s2">&quot;mC2&quot;</span><span class="p">,</span> <span class="s2">&quot;mC3&quot;</span><span class="p">]:</span>
            <span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">]])</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Sub-classification of crystal not found!&quot;</span><span class="p">)</span></div>


<div class="viewcode-block" id="KPathLatimerMunro"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathLatimerMunro">[docs]</a><span class="k">class</span> <span class="nc">KPathLatimerMunro</span><span class="p">(</span><span class="n">KPathBase</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    This class looks for a path along high symmetry lines in the</span>
<span class="sd">    Brillouin zone.</span>
<span class="sd">    It is based on the derived symmetry of the energy spectrum</span>
<span class="sd">    for a crystalline solid given by A P Cracknell in J. Phys. C:</span>
<span class="sd">    Solid State Phys. Vol. 6 (1973), pp. 826-840 (&#39;Van Hove</span>
<span class="sd">    singularities and zero-slope points in crystals&#39;) and pp. 841-</span>
<span class="sd">    854 (&#39;Van Hove singularities and zero-slope points in magnetic</span>
<span class="sd">    crystals&#39;).</span>
<span class="sd">    The user should ensure that the lattice of the input structure</span>
<span class="sd">    is as reduced as possible, i.e. that there is no linear</span>
<span class="sd">    combination of lattice vectors which can produce a vector of</span>
<span class="sd">    lesser magnitude than the given set (this is required to</span>
<span class="sd">    obtain the correct Brillouin zone within the current</span>
<span class="sd">    implementaiton). This is checked during initialization and a</span>
<span class="sd">    warning is issued if the condition is not fulfilled.</span>
<span class="sd">    In the case of magnetic structures, care must also be taken to</span>
<span class="sd">    provide the magnetic primitive cell (i.e. that which reproduces</span>
<span class="sd">    the entire crystal, including the correct magnetic ordering,</span>
<span class="sd">    upon application of lattice translations). There is no way to</span>
<span class="sd">    programatically check for this, so if the input structure is</span>
<span class="sd">    incorrect, the class will output the incorrect kpath without</span>
<span class="sd">    any warning being issued.</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">structure</span><span class="p">,</span> <span class="n">has_magmoms</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">magmom_axis</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">symprec</span><span class="o">=</span><span class="mf">0.01</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="mf">1e-5</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Args:</span>
<span class="sd">            structure (Structure): Structure object</span>
<span class="sd">            has_magmoms (boolean): Whether the input structure contains</span>
<span class="sd">                magnetic moments as site properties with the key &#39;magmom.&#39;</span>
<span class="sd">                Values may be in the form of 3-component vectors given in</span>
<span class="sd">                the basis of the input lattice vectors, or as scalars, in</span>
<span class="sd">                which case the spin axis will default to a_3, the third</span>
<span class="sd">                real-space lattice vector (this triggers a warning).</span>
<span class="sd">            magmom_axis (list or numpy array): 3-component vector specifying</span>
<span class="sd">                direction along which magnetic moments given as scalars</span>
<span class="sd">                should point. If all magnetic moments are provided as</span>
<span class="sd">                vectors then this argument is not used.</span>
<span class="sd">            symprec (float): Tolerance for symmetry finding</span>
<span class="sd">            angle_tolerance (float): Angle tolerance for symmetry finding.</span>
<span class="sd">            atol (float): Absolute tolerance used to determine symmetric</span>
<span class="sd">                equivalence of points and lines on the BZ.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">structure</span><span class="p">,</span> <span class="n">symprec</span><span class="o">=</span><span class="n">symprec</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="o">=</span><span class="n">angle_tolerance</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">)</span>

        <span class="c1"># Check to see if input lattice is reducible. Ref: B Gruber in Acta. Cryst. Vol. A29,</span>
        <span class="c1"># pp. 433-440 (&#39;The Relationship between Reduced Cells in a General Bravais lattice&#39;).</span>
        <span class="c1"># The correct BZ will still be obtained if the lattice vectors are reducible by any</span>
        <span class="c1"># linear combination of themselves with coefficients of absolute value less than 2,</span>
        <span class="c1"># hence a missing factor of 2 as compared to the reference.</span>
        <span class="n">reducible</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span>
            <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span>
                <span class="k">if</span> <span class="n">i</span> <span class="o">!=</span> <span class="n">j</span><span class="p">:</span>
                    <span class="k">if</span> <span class="p">(</span>
                            <span class="n">np</span><span class="o">.</span><span class="n">absolute</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_latt</span><span class="o">.</span><span class="n">matrix</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="bp">self</span><span class="o">.</span><span class="n">_latt</span><span class="o">.</span><span class="n">matrix</span><span class="p">[</span><span class="n">j</span><span class="p">]))</span>
                            <span class="o">&gt;</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_latt</span><span class="o">.</span><span class="n">matrix</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="bp">self</span><span class="o">.</span><span class="n">_latt</span><span class="o">.</span><span class="n">matrix</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
                            <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">absolute</span><span class="p">(</span>
                                <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_latt</span><span class="o">.</span><span class="n">matrix</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="bp">self</span><span class="o">.</span><span class="n">_latt</span><span class="o">.</span><span class="n">matrix</span><span class="p">[</span><span class="n">j</span><span class="p">])</span>
                                <span class="o">-</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_latt</span><span class="o">.</span><span class="n">matrix</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="bp">self</span><span class="o">.</span><span class="n">_latt</span><span class="o">.</span><span class="n">matrix</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
                            <span class="p">)</span>
                            <span class="o">&gt;</span> <span class="n">atol</span>
                    <span class="p">):</span>
                        <span class="n">reducible</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="kc">True</span><span class="p">)</span>
                    <span class="k">else</span><span class="p">:</span>
                        <span class="n">reducible</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">any</span><span class="p">(</span><span class="n">reducible</span><span class="p">):</span>
            <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;reducible&quot;</span><span class="p">)</span>
            <span class="n">warn</span><span class="p">(</span>
                <span class="s2">&quot;The lattice of the input structure is not fully reduced!&quot;</span>
                <span class="s2">&quot;The path can be incorrect. Use at your own risk.&quot;</span>
            <span class="p">)</span>

        <span class="k">if</span> <span class="n">magmom_axis</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">magmom_axis</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">])</span>
            <span class="n">axis_specified</span> <span class="o">=</span> <span class="kc">False</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="n">axis_specified</span> <span class="o">=</span> <span class="kc">True</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">_kpath</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_ksymm_kpath</span><span class="p">(</span><span class="n">has_magmoms</span><span class="p">,</span> <span class="n">magmom_axis</span><span class="p">,</span> <span class="n">axis_specified</span><span class="p">,</span> <span class="n">symprec</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>

    <span class="nd">@property</span>
    <span class="k">def</span> <span class="nf">mag_type</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Returns:</span>
<span class="sd">        The type of magnetic space group as a string.</span>
<span class="sd">        Current implementation does not distinguish</span>
<span class="sd">        between types 3 and 4, so return value is &#39;3/4&#39;.</span>
<span class="sd">        If has_magmoms is False, returns &#39;0&#39;.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_mag_type</span>

    <span class="k">def</span> <span class="nf">_get_ksymm_kpath</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">has_magmoms</span><span class="p">,</span> <span class="n">magmom_axis</span><span class="p">,</span> <span class="n">axis_specified</span><span class="p">,</span> <span class="n">symprec</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
        <span class="n">ID</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">]])</span>
        <span class="c1"># parity, aka the inversion operation (not calling it</span>
        <span class="n">PAR</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">]])</span>
        <span class="c1"># INV to avoid confusion with np.linalg.inv() function)</span>

        <span class="c1"># 1: Get lattices of real and reciprocal structures, and reciprocal</span>
        <span class="c1"># point group, and Brillouin zone (BZ)</span>

        <span class="n">V</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_latt</span><span class="o">.</span><span class="n">matrix</span><span class="o">.</span><span class="n">T</span>  <span class="c1"># fractional real space to cartesian real space</span>
        <span class="c1"># fractional reciprocal space to cartesian reciprocal space</span>
        <span class="n">W</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">matrix</span><span class="o">.</span><span class="n">T</span>
        <span class="c1"># fractional real space to fractional reciprocal space</span>
        <span class="n">A</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">inv</span><span class="p">(</span><span class="n">W</span><span class="p">),</span> <span class="n">V</span><span class="p">)</span>

        <span class="k">if</span> <span class="n">has_magmoms</span><span class="p">:</span>
            <span class="n">grey_struct</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_structure</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
            <span class="n">grey_struct</span><span class="o">.</span><span class="n">remove_site_property</span><span class="p">(</span><span class="s2">&quot;magmom&quot;</span><span class="p">)</span>
            <span class="n">sga</span> <span class="o">=</span> <span class="n">SpacegroupAnalyzer</span><span class="p">(</span><span class="n">grey_struct</span><span class="p">,</span> <span class="n">symprec</span><span class="o">=</span><span class="n">symprec</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="o">=</span><span class="n">angle_tolerance</span><span class="p">)</span>
            <span class="n">grey_ops</span> <span class="o">=</span> <span class="n">sga</span><span class="o">.</span><span class="n">get_symmetry_operations</span><span class="p">()</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_structure</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_convert_all_magmoms_to_vectors</span><span class="p">(</span><span class="n">magmom_axis</span><span class="p">,</span> <span class="n">axis_specified</span><span class="p">)</span>
            <span class="n">mag_ops</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_magnetic_symmetry_operations</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_structure</span><span class="p">,</span> <span class="n">grey_ops</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>

            <span class="n">D</span> <span class="o">=</span> <span class="p">[</span>
                <span class="n">SymmOp</span><span class="o">.</span><span class="n">from_rotation_and_translation</span><span class="p">(</span>
                    <span class="n">rotation_matrix</span><span class="o">=</span><span class="n">op</span><span class="o">.</span><span class="n">rotation_matrix</span><span class="p">,</span> <span class="n">translation_vec</span><span class="o">=</span><span class="n">op</span><span class="o">.</span><span class="n">translation_vector</span><span class="p">,</span>
                <span class="p">)</span>
                <span class="k">for</span> <span class="n">op</span> <span class="ow">in</span> <span class="n">mag_ops</span>
                <span class="k">if</span> <span class="n">op</span><span class="o">.</span><span class="n">time_reversal</span> <span class="o">==</span> <span class="mi">1</span>
            <span class="p">]</span>

            <span class="n">fD</span> <span class="o">=</span> <span class="p">[</span>
                <span class="n">SymmOp</span><span class="o">.</span><span class="n">from_rotation_and_translation</span><span class="p">(</span>
                    <span class="n">rotation_matrix</span><span class="o">=</span><span class="n">op</span><span class="o">.</span><span class="n">rotation_matrix</span><span class="p">,</span> <span class="n">translation_vec</span><span class="o">=</span><span class="n">op</span><span class="o">.</span><span class="n">translation_vector</span><span class="p">,</span>
                <span class="p">)</span>
                <span class="k">for</span> <span class="n">op</span> <span class="ow">in</span> <span class="n">mag_ops</span>
                <span class="k">if</span> <span class="n">op</span><span class="o">.</span><span class="n">time_reversal</span> <span class="o">==</span> <span class="o">-</span><span class="mi">1</span>
            <span class="p">]</span>

            <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">m</span> <span class="o">==</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">])</span> <span class="k">for</span> <span class="n">m</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_structure</span><span class="o">.</span><span class="n">site_properties</span><span class="p">[</span><span class="s2">&quot;magmom&quot;</span><span class="p">]])</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>
                <span class="n">fD</span> <span class="o">=</span> <span class="n">D</span>
                <span class="n">D</span> <span class="o">=</span> <span class="p">[]</span>

            <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">fD</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>  <span class="c1"># no operations contain time reversal; type 1</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_mag_type</span> <span class="o">=</span> <span class="s2">&quot;1&quot;</span>
                <span class="n">isomorphic_point_group</span> <span class="o">=</span> <span class="p">[</span><span class="n">d</span><span class="o">.</span><span class="n">rotation_matrix</span> <span class="k">for</span> <span class="n">d</span> <span class="ow">in</span> <span class="n">D</span><span class="p">]</span>
                <span class="n">recip_point_group</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_reciprocal_point_group</span><span class="p">(</span><span class="n">isomorphic_point_group</span><span class="p">,</span> <span class="n">ID</span><span class="p">,</span> <span class="n">A</span><span class="p">)</span>
            <span class="k">elif</span> <span class="nb">len</span><span class="p">(</span><span class="n">D</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>  <span class="c1"># all operations contain time reversal / all magmoms zero; type 2</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_mag_type</span> <span class="o">=</span> <span class="s2">&quot;2&quot;</span>
                <span class="n">isomorphic_point_group</span> <span class="o">=</span> <span class="p">[</span><span class="n">d</span><span class="o">.</span><span class="n">rotation_matrix</span> <span class="k">for</span> <span class="n">d</span> <span class="ow">in</span> <span class="n">fD</span><span class="p">]</span>
                <span class="n">recip_point_group</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_reciprocal_point_group</span><span class="p">(</span><span class="n">isomorphic_point_group</span><span class="p">,</span> <span class="n">PAR</span><span class="p">,</span> <span class="n">A</span><span class="p">)</span>
            <span class="k">else</span><span class="p">:</span>  <span class="c1"># half and half; type 3 or 4</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_mag_type</span> <span class="o">=</span> <span class="s2">&quot;3/4&quot;</span>
                <span class="n">f</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_coset_factor</span><span class="p">(</span><span class="n">D</span> <span class="o">+</span> <span class="n">fD</span><span class="p">,</span> <span class="n">D</span><span class="p">)</span>
                <span class="n">isomorphic_point_group</span> <span class="o">=</span> <span class="p">[</span><span class="n">d</span><span class="o">.</span><span class="n">rotation_matrix</span> <span class="k">for</span> <span class="n">d</span> <span class="ow">in</span> <span class="n">D</span><span class="p">]</span>
                <span class="n">recip_point_group</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_reciprocal_point_group</span><span class="p">(</span>
                    <span class="n">isomorphic_point_group</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">PAR</span><span class="p">,</span> <span class="n">f</span><span class="o">.</span><span class="n">rotation_matrix</span><span class="p">),</span> <span class="n">A</span>
                <span class="p">)</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_mag_type</span> <span class="o">=</span> <span class="s2">&quot;0&quot;</span>
            <span class="k">if</span> <span class="s2">&quot;magmom&quot;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_structure</span><span class="o">.</span><span class="n">site_properties</span><span class="p">:</span>
                <span class="n">warn</span><span class="p">(</span>
                    <span class="s2">&quot;The parameter has_magmoms is False, but site_properties contains the key magmom.&quot;</span>
                    <span class="s2">&quot;This property will be removed and could result in different symmetry operations.&quot;</span>
                <span class="p">)</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_structure</span><span class="o">.</span><span class="n">remove_site_property</span><span class="p">(</span><span class="s2">&quot;magmom&quot;</span><span class="p">)</span>
            <span class="n">sga</span> <span class="o">=</span> <span class="n">SpacegroupAnalyzer</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_structure</span><span class="p">)</span>
            <span class="n">ops</span> <span class="o">=</span> <span class="n">sga</span><span class="o">.</span><span class="n">get_symmetry_operations</span><span class="p">()</span>
            <span class="n">isomorphic_point_group</span> <span class="o">=</span> <span class="p">[</span><span class="n">op</span><span class="o">.</span><span class="n">rotation_matrix</span> <span class="k">for</span> <span class="n">op</span> <span class="ow">in</span> <span class="n">ops</span><span class="p">]</span>

            <span class="n">recip_point_group</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_reciprocal_point_group</span><span class="p">(</span><span class="n">isomorphic_point_group</span><span class="p">,</span> <span class="n">PAR</span><span class="p">,</span> <span class="n">A</span><span class="p">)</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">_rpg</span> <span class="o">=</span> <span class="n">recip_point_group</span>

        <span class="c1"># 2: Get all vertices, edge- and face- center points of BZ (&quot;key points&quot;)</span>

        <span class="n">key_points</span><span class="p">,</span> <span class="n">bz_as_key_point_inds</span><span class="p">,</span> <span class="n">face_center_inds</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_key_points</span><span class="p">()</span>

        <span class="c1"># 3: Find symmetry-equivalent points, which can be mapped to each other by a combination of point group</span>
        <span class="c1"># operations and integer translations by lattice vectors. The integers will only be -1, 0, or 1, since</span>
        <span class="c1"># we are restricting to the BZ.</span>

        <span class="n">key_points_inds_orbits</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_key_point_orbits</span><span class="p">(</span><span class="n">key_points</span><span class="o">=</span><span class="n">key_points</span><span class="p">)</span>

        <span class="c1"># 4: Get all lines on BZ between adjacent key points and between gamma</span>
        <span class="c1"># and key points (&quot;key lines&quot;)</span>

        <span class="n">key_lines</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_key_lines</span><span class="p">(</span><span class="n">key_points</span><span class="o">=</span><span class="n">key_points</span><span class="p">,</span> <span class="n">bz_as_key_point_inds</span><span class="o">=</span><span class="n">bz_as_key_point_inds</span><span class="p">)</span>

        <span class="c1"># 5: Find symmetry-equivalent key lines, defined as endpoints of first line being equivalent</span>
        <span class="c1"># to end points of second line, and a random point in between being equivalent to the mapped</span>
        <span class="c1"># random point.</span>

        <span class="n">key_lines_inds_orbits</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_key_line_orbits</span><span class="p">(</span>
            <span class="n">key_points</span><span class="o">=</span><span class="n">key_points</span><span class="p">,</span> <span class="n">key_lines</span><span class="o">=</span><span class="n">key_lines</span><span class="p">,</span> <span class="n">key_points_inds_orbits</span><span class="o">=</span><span class="n">key_points_inds_orbits</span>
        <span class="p">)</span>

        <span class="c1"># 6 &amp; 7: Get little groups for key points (group of symmetry elements present at that point).</span>
        <span class="c1"># Get little groups for key lines (group of symmetry elements present at every point</span>
        <span class="c1"># along the line). This is implemented by testing the symmetry at a point e/pi of the</span>
        <span class="c1"># way between the two endpoints.</span>

        <span class="n">little_groups_points</span><span class="p">,</span> <span class="n">little_groups_lines</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_little_groups</span><span class="p">(</span>
            <span class="n">key_points</span><span class="o">=</span><span class="n">key_points</span><span class="p">,</span>
            <span class="n">key_points_inds_orbits</span><span class="o">=</span><span class="n">key_points_inds_orbits</span><span class="p">,</span>
            <span class="n">key_lines_inds_orbits</span><span class="o">=</span><span class="n">key_lines_inds_orbits</span><span class="p">,</span>
        <span class="p">)</span>

        <span class="c1"># 8: Choose key lines for k-path. Loose criteria set: choose any points / segments</span>
        <span class="c1"># with spatial symmetry greater than the general position (AKA more symmetry operations</span>
        <span class="c1"># than just the identity or identity * TR in the little group).</span>
        <span class="c1"># This function can be edited to alter high-symmetry criteria for choosing points and lines</span>

        <span class="n">point_orbits_in_path</span><span class="p">,</span> <span class="n">line_orbits_in_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_choose_path</span><span class="p">(</span>
            <span class="n">key_points</span><span class="o">=</span><span class="n">key_points</span><span class="p">,</span>
            <span class="n">key_points_inds_orbits</span><span class="o">=</span><span class="n">key_points_inds_orbits</span><span class="p">,</span>
            <span class="n">key_lines_inds_orbits</span><span class="o">=</span><span class="n">key_lines_inds_orbits</span><span class="p">,</span>
            <span class="n">little_groups_points</span><span class="o">=</span><span class="n">little_groups_points</span><span class="p">,</span>
            <span class="n">little_groups_lines</span><span class="o">=</span><span class="n">little_groups_lines</span><span class="p">,</span>
        <span class="p">)</span>

        <span class="c1"># 10: Consolidate selected segments into a single irreducible section of the Brilouin zone (as determined</span>
        <span class="c1"># by the reciprocal point and lattice symmetries). This is accomplished by identifying the boundary</span>
        <span class="c1"># planes of the IRBZ. Also, get labels for points according to distance away from axes.</span>

        <span class="n">IRBZ_points_inds</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_IRBZ</span><span class="p">(</span><span class="n">recip_point_group</span><span class="p">,</span> <span class="n">W</span><span class="p">,</span> <span class="n">key_points</span><span class="p">,</span> <span class="n">face_center_inds</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>
        <span class="n">lines_in_path_inds</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="k">for</span> <span class="n">ind</span> <span class="ow">in</span> <span class="n">line_orbits_in_path</span><span class="p">:</span>
            <span class="k">for</span> <span class="n">tup</span> <span class="ow">in</span> <span class="n">key_lines_inds_orbits</span><span class="p">[</span><span class="n">ind</span><span class="p">]:</span>
                <span class="k">if</span> <span class="n">tup</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="n">IRBZ_points_inds</span> <span class="ow">and</span> <span class="n">tup</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="ow">in</span> <span class="n">IRBZ_points_inds</span><span class="p">:</span>
                    <span class="n">lines_in_path_inds</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">tup</span><span class="p">)</span>
                    <span class="k">break</span>
        <span class="n">G</span> <span class="o">=</span> <span class="n">nx</span><span class="o">.</span><span class="n">Graph</span><span class="p">(</span><span class="n">lines_in_path_inds</span><span class="p">)</span>
        <span class="n">lines_in_path_inds</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">nx</span><span class="o">.</span><span class="n">edge_dfs</span><span class="p">(</span><span class="n">G</span><span class="p">))</span>
        <span class="n">points_in_path_inds</span> <span class="o">=</span> <span class="p">[</span><span class="n">ind</span> <span class="k">for</span> <span class="n">tup</span> <span class="ow">in</span> <span class="n">lines_in_path_inds</span> <span class="k">for</span> <span class="n">ind</span> <span class="ow">in</span> <span class="n">tup</span><span class="p">]</span>
        <span class="n">points_in_path_inds_unique</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">points_in_path_inds</span><span class="p">))</span>

        <span class="n">orbit_cosines</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">orbit</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">key_points_inds_orbits</span><span class="p">[:</span><span class="o">-</span><span class="mi">1</span><span class="p">]):</span>

            <span class="n">orbit_cosines</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
                <span class="nb">sorted</span><span class="p">(</span>
                    <span class="nb">sorted</span><span class="p">(</span>
                        <span class="p">[</span>
                            <span class="p">(</span>
                                <span class="n">j</span><span class="p">,</span>
                                <span class="n">np</span><span class="o">.</span><span class="n">round</span><span class="p">(</span>
                                    <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">key_points</span><span class="p">[</span><span class="n">k</span><span class="p">],</span> <span class="bp">self</span><span class="o">.</span><span class="n">LabelPoints</span><span class="p">(</span><span class="n">j</span><span class="p">))</span>
                                    <span class="o">/</span> <span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">norm</span><span class="p">(</span><span class="n">key_points</span><span class="p">[</span><span class="n">k</span><span class="p">])</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">norm</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">LabelPoints</span><span class="p">(</span><span class="n">j</span><span class="p">))),</span>
                                    <span class="n">decimals</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span>
                                <span class="p">),</span>
                            <span class="p">)</span>
                            <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">orbit</span>
                            <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">26</span><span class="p">)</span>
                        <span class="p">],</span>
                        <span class="n">key</span><span class="o">=</span><span class="n">operator</span><span class="o">.</span><span class="n">itemgetter</span><span class="p">(</span><span class="mi">0</span><span class="p">),</span>
                    <span class="p">),</span>
                    <span class="n">key</span><span class="o">=</span><span class="n">operator</span><span class="o">.</span><span class="n">itemgetter</span><span class="p">(</span><span class="mi">1</span><span class="p">),</span>
                    <span class="n">reverse</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
                <span class="p">)</span>
            <span class="p">)</span>

        <span class="n">orbit_labels</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_orbit_labels</span><span class="p">(</span><span class="n">orbit_cosines</span><span class="p">,</span> <span class="n">key_points_inds_orbits</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>
        <span class="n">key_points_labels</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;&quot;</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points</span><span class="p">))]</span>
        <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">orbit</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">key_points_inds_orbits</span><span class="p">):</span>
            <span class="k">for</span> <span class="n">point_ind</span> <span class="ow">in</span> <span class="n">orbit</span><span class="p">:</span>
                <span class="n">key_points_labels</span><span class="p">[</span><span class="n">point_ind</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">LabelSymbol</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">orbit_labels</span><span class="p">[</span><span class="n">i</span><span class="p">]))</span>

        <span class="n">kpoints</span> <span class="o">=</span> <span class="p">{}</span>
        <span class="n">reverse_kpoints</span> <span class="o">=</span> <span class="p">{}</span>
        <span class="k">for</span> <span class="n">point_ind</span> <span class="ow">in</span> <span class="n">points_in_path_inds_unique</span><span class="p">:</span>
            <span class="n">point_label</span> <span class="o">=</span> <span class="n">key_points_labels</span><span class="p">[</span><span class="n">point_ind</span><span class="p">]</span>
            <span class="k">if</span> <span class="n">point_label</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">kpoints</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
                <span class="n">kpoints</span><span class="p">[</span><span class="n">point_label</span><span class="p">]</span> <span class="o">=</span> <span class="n">key_points</span><span class="p">[</span><span class="n">point_ind</span><span class="p">]</span>
                <span class="n">reverse_kpoints</span><span class="p">[</span><span class="n">point_ind</span><span class="p">]</span> <span class="o">=</span> <span class="n">point_label</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">existing_labels</span> <span class="o">=</span> <span class="p">[</span><span class="n">key</span> <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">kpoints</span><span class="o">.</span><span class="n">keys</span><span class="p">()</span> <span class="k">if</span> <span class="n">point_label</span> <span class="ow">in</span> <span class="n">key</span><span class="p">]</span>
                <span class="k">if</span> <span class="s2">&quot;&#39;&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">point_label</span><span class="p">:</span>
                    <span class="n">existing_labels</span><span class="p">[:]</span> <span class="o">=</span> <span class="p">[</span><span class="n">label</span> <span class="k">for</span> <span class="n">label</span> <span class="ow">in</span> <span class="n">existing_labels</span> <span class="k">if</span> <span class="s2">&quot;&#39;&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">label</span><span class="p">]</span>
                <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">existing_labels</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
                    <span class="n">max_occurence</span> <span class="o">=</span> <span class="mi">0</span>
                <span class="k">else</span><span class="p">:</span>
                    <span class="k">if</span> <span class="s2">&quot;&#39;&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">point_label</span><span class="p">:</span>
                        <span class="n">max_occurence</span> <span class="o">=</span> <span class="nb">max</span><span class="p">([</span><span class="nb">int</span><span class="p">(</span><span class="n">label</span><span class="p">[</span><span class="mi">3</span><span class="p">:</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span> <span class="k">for</span> <span class="n">label</span> <span class="ow">in</span> <span class="n">existing_labels</span><span class="p">[</span><span class="mi">1</span><span class="p">:]])</span>
                    <span class="k">else</span><span class="p">:</span>
                        <span class="n">max_occurence</span> <span class="o">=</span> <span class="nb">max</span><span class="p">([</span><span class="nb">int</span><span class="p">(</span><span class="n">label</span><span class="p">[</span><span class="mi">4</span><span class="p">:</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span> <span class="k">for</span> <span class="n">label</span> <span class="ow">in</span> <span class="n">existing_labels</span><span class="p">[</span><span class="mi">1</span><span class="p">:]])</span>
                <span class="n">kpoints</span><span class="p">[</span><span class="n">point_label</span> <span class="o">+</span> <span class="s2">&quot;_{&quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">max_occurence</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;}&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">key_points</span><span class="p">[</span><span class="n">point_ind</span><span class="p">]</span>
                <span class="n">reverse_kpoints</span><span class="p">[</span><span class="n">point_ind</span><span class="p">]</span> <span class="o">=</span> <span class="n">point_label</span> <span class="o">+</span> <span class="s2">&quot;_{&quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">max_occurence</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;}&quot;</span>

        <span class="n">path</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
        <span class="n">start_of_subpath</span> <span class="o">=</span> <span class="kc">True</span>
        <span class="k">while</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="nb">len</span><span class="p">(</span><span class="n">points_in_path_inds</span><span class="p">):</span>
            <span class="k">if</span> <span class="n">start_of_subpath</span><span class="p">:</span>
                <span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="n">reverse_kpoints</span><span class="p">[</span><span class="n">points_in_path_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]]])</span>
                <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
                <span class="n">start_of_subpath</span> <span class="o">=</span> <span class="kc">False</span>
            <span class="k">elif</span> <span class="n">points_in_path_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">points_in_path_inds</span><span class="p">[</span><span class="n">i</span> <span class="o">+</span> <span class="mi">1</span><span class="p">]:</span>
                <span class="n">path</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">reverse_kpoints</span><span class="p">[</span><span class="n">points_in_path_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]])</span>
                <span class="n">i</span> <span class="o">+=</span> <span class="mi">2</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">path</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">reverse_kpoints</span><span class="p">[</span><span class="n">points_in_path_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]])</span>
                <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
                <span class="n">start_of_subpath</span> <span class="o">=</span> <span class="kc">True</span>
            <span class="k">if</span> <span class="n">i</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">points_in_path_inds</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">:</span>
                <span class="n">path</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">reverse_kpoints</span><span class="p">[</span><span class="n">points_in_path_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]])</span>
                <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>

        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;kpoints&quot;</span><span class="p">:</span> <span class="n">kpoints</span><span class="p">,</span> <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="n">path</span><span class="p">}</span>

    <span class="k">def</span> <span class="nf">_choose_path</span><span class="p">(</span>
            <span class="bp">self</span><span class="p">,</span> <span class="n">key_points</span><span class="p">,</span> <span class="n">key_points_inds_orbits</span><span class="p">,</span> <span class="n">key_lines_inds_orbits</span><span class="p">,</span> <span class="n">little_groups_points</span><span class="p">,</span> <span class="n">little_groups_lines</span>
    <span class="p">):</span>
        <span class="c1">#</span>
        <span class="c1"># This function can be edited to alter high-symmetry criteria for choosing points and lines</span>
        <span class="c1">#</span>

        <span class="n">ID</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">]])</span>
        <span class="n">PAR</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">]])</span>

        <span class="n">gamma_ind</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">key_points</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span>

        <span class="n">line_orbits_in_path</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">point_orbits_in_path</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="k">for</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">little_group</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">little_groups_lines</span><span class="p">):</span>
            <span class="n">add_rep</span> <span class="o">=</span> <span class="kc">False</span>
            <span class="n">nC2</span> <span class="o">=</span> <span class="mi">0</span>
            <span class="n">nC3</span> <span class="o">=</span> <span class="mi">0</span>
            <span class="n">nsig</span> <span class="o">=</span> <span class="mi">0</span>
            <span class="k">for</span> <span class="n">j</span><span class="p">,</span> <span class="n">opind</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">little_group</span><span class="p">):</span>
                <span class="n">op</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rpg</span><span class="p">[</span><span class="n">opind</span><span class="p">]</span>
                <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">op</span> <span class="o">==</span> <span class="n">ID</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>
                    <span class="k">if</span> <span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">op</span><span class="p">)</span> <span class="o">==</span> <span class="n">ID</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>
                        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">det</span><span class="p">(</span><span class="n">op</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
                            <span class="n">nC2</span> <span class="o">+=</span> <span class="mi">1</span>
                            <span class="k">break</span>
                        <span class="k">elif</span> <span class="ow">not</span> <span class="p">(</span><span class="n">op</span> <span class="o">==</span> <span class="n">PAR</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>
                            <span class="n">nsig</span> <span class="o">+=</span> <span class="mi">1</span>
                            <span class="k">break</span>
                    <span class="k">elif</span> <span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">op</span><span class="p">))</span> <span class="o">==</span> <span class="n">ID</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>
                        <span class="n">nC3</span> <span class="o">+=</span> <span class="mi">1</span>
                        <span class="k">break</span>
            <span class="k">if</span> <span class="n">nC2</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="ow">or</span> <span class="n">nC3</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="ow">or</span> <span class="n">nsig</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
                <span class="n">add_rep</span> <span class="o">=</span> <span class="kc">True</span>

            <span class="k">if</span> <span class="n">add_rep</span><span class="p">:</span>
                <span class="n">line_orbits_in_path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
                <span class="n">l</span> <span class="o">=</span> <span class="n">key_lines_inds_orbits</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
                <span class="n">ind0</span> <span class="o">=</span> <span class="n">l</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
                <span class="n">ind1</span> <span class="o">=</span> <span class="n">l</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
                <span class="n">found0</span> <span class="o">=</span> <span class="kc">False</span>
                <span class="n">found1</span> <span class="o">=</span> <span class="kc">False</span>
                <span class="k">for</span> <span class="p">(</span><span class="n">j</span><span class="p">,</span> <span class="n">orbit</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">key_points_inds_orbits</span><span class="p">):</span>
                    <span class="k">if</span> <span class="n">ind0</span> <span class="ow">in</span> <span class="n">orbit</span><span class="p">:</span>
                        <span class="n">point_orbits_in_path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">j</span><span class="p">)</span>
                        <span class="n">found0</span> <span class="o">=</span> <span class="kc">True</span>
                    <span class="k">if</span> <span class="n">ind1</span> <span class="ow">in</span> <span class="n">orbit</span><span class="p">:</span>
                        <span class="n">point_orbits_in_path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">j</span><span class="p">)</span>
                        <span class="n">found1</span> <span class="o">=</span> <span class="kc">True</span>
                    <span class="k">if</span> <span class="n">found0</span> <span class="ow">and</span> <span class="n">found1</span><span class="p">:</span>
                        <span class="k">break</span>
        <span class="n">point_orbits_in_path</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">point_orbits_in_path</span><span class="p">))</span>

        <span class="c1"># Choose remaining unconnected key points for k-path. The ones that remain are</span>
        <span class="c1"># those with inversion symmetry. Connect them to gamma.</span>

        <span class="n">unconnected</span> <span class="o">=</span> <span class="p">[]</span>

        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points_inds_orbits</span><span class="p">)):</span>
            <span class="k">if</span> <span class="n">i</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">point_orbits_in_path</span><span class="p">:</span>
                <span class="n">unconnected</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>

        <span class="k">for</span> <span class="n">ind</span> <span class="ow">in</span> <span class="n">unconnected</span><span class="p">:</span>
            <span class="n">connect</span> <span class="o">=</span> <span class="kc">False</span>
            <span class="k">for</span> <span class="n">op_ind</span> <span class="ow">in</span> <span class="n">little_groups_points</span><span class="p">[</span><span class="n">ind</span><span class="p">]:</span>
                <span class="n">op</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rpg</span><span class="p">[</span><span class="n">op_ind</span><span class="p">]</span>
                <span class="k">if</span> <span class="p">(</span><span class="n">op</span> <span class="o">==</span> <span class="n">ID</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>
                    <span class="k">pass</span>
                <span class="k">elif</span> <span class="p">(</span><span class="n">op</span> <span class="o">==</span> <span class="n">PAR</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>
                    <span class="n">connect</span> <span class="o">=</span> <span class="kc">True</span>
                    <span class="k">break</span>
                <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">det</span><span class="p">(</span><span class="n">op</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
                    <span class="k">if</span> <span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">op</span><span class="p">))</span> <span class="o">==</span> <span class="n">ID</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>
                        <span class="k">pass</span>
                    <span class="k">else</span><span class="p">:</span>
                        <span class="n">connect</span> <span class="o">=</span> <span class="kc">True</span>
                        <span class="k">break</span>
                <span class="k">else</span><span class="p">:</span>
                    <span class="k">pass</span>
            <span class="k">if</span> <span class="n">connect</span><span class="p">:</span>
                <span class="n">l</span> <span class="o">=</span> <span class="p">(</span><span class="n">key_points_inds_orbits</span><span class="p">[</span><span class="n">ind</span><span class="p">][</span><span class="mi">0</span><span class="p">],</span> <span class="n">gamma_ind</span><span class="p">)</span>
                <span class="k">for</span> <span class="p">(</span><span class="n">j</span><span class="p">,</span> <span class="n">orbit</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">key_lines_inds_orbits</span><span class="p">):</span>
                    <span class="k">if</span> <span class="n">l</span> <span class="ow">in</span> <span class="n">orbit</span><span class="p">:</span>
                        <span class="n">line_orbits_in_path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">j</span><span class="p">)</span>
                        <span class="k">break</span>
                <span class="k">if</span> <span class="n">gamma_ind</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">point_orbits_in_path</span><span class="p">:</span>
                    <span class="n">point_orbits_in_path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">gamma_ind</span><span class="p">)</span>
                <span class="n">point_orbits_in_path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ind</span><span class="p">)</span>

        <span class="k">return</span> <span class="n">point_orbits_in_path</span><span class="p">,</span> <span class="n">line_orbits_in_path</span>

    <span class="k">def</span> <span class="nf">_get_key_points</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="n">decimals</span> <span class="o">=</span> <span class="n">ceil</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">))</span> <span class="o">-</span> <span class="mi">1</span>
        <span class="n">bz</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">get_wigner_seitz_cell</span><span class="p">()</span>

        <span class="n">key_points</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">face_center_inds</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">bz_as_key_point_inds</span> <span class="o">=</span> <span class="p">[]</span>

        <span class="c1"># pymatgen gives BZ in cartesian coordinates; convert to fractional in</span>
        <span class="c1"># the primitive basis for reciprocal space</span>
        <span class="k">for</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">facet</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">bz</span><span class="p">):</span>
            <span class="k">for</span> <span class="p">(</span><span class="n">j</span><span class="p">,</span> <span class="n">vert</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">facet</span><span class="p">):</span>
                <span class="n">vert</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rec_lattice</span><span class="o">.</span><span class="n">get_fractional_coords</span><span class="p">(</span><span class="n">vert</span><span class="p">)</span>
                <span class="n">bz</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">j</span><span class="p">]</span> <span class="o">=</span> <span class="n">vert</span>
        <span class="n">pop</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">facet</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">bz</span><span class="p">):</span>
            <span class="n">rounded_facet</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">around</span><span class="p">(</span><span class="n">facet</span><span class="p">,</span> <span class="n">decimals</span><span class="o">=</span><span class="n">decimals</span><span class="p">)</span>
            <span class="n">u</span><span class="p">,</span> <span class="n">indices</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">unique</span><span class="p">(</span><span class="n">rounded_facet</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">return_index</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
            <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">u</span><span class="p">)</span> <span class="ow">in</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">]:</span>
                <span class="n">pop</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">bz</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="n">facet</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="n">np</span><span class="o">.</span><span class="n">sort</span><span class="p">(</span><span class="n">indices</span><span class="p">)]</span>
        <span class="n">bz</span> <span class="o">=</span> <span class="p">[</span><span class="n">bz</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">bz</span><span class="p">))</span> <span class="k">if</span> <span class="n">i</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">pop</span><span class="p">]</span>

        <span class="c1"># use vertex points to calculate edge- and face- centers</span>
        <span class="k">for</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">facet</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">bz</span><span class="p">):</span>
            <span class="n">bz_as_key_point_inds</span><span class="o">.</span><span class="n">append</span><span class="p">([])</span>
            <span class="k">for</span> <span class="p">(</span><span class="n">j</span><span class="p">,</span> <span class="n">vert</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">facet</span><span class="p">):</span>
                <span class="n">edge_center</span> <span class="o">=</span> <span class="p">(</span><span class="n">vert</span> <span class="o">+</span> <span class="n">facet</span><span class="p">[</span><span class="n">j</span> <span class="o">+</span> <span class="mi">1</span><span class="p">])</span> <span class="o">/</span> <span class="mf">2.0</span> <span class="k">if</span> <span class="n">j</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">facet</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span> <span class="k">else</span> <span class="p">(</span><span class="n">vert</span> <span class="o">+</span> <span class="n">facet</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="o">/</span> <span class="mf">2.0</span>
                <span class="n">duplicatevert</span> <span class="o">=</span> <span class="kc">False</span>
                <span class="n">duplicateedge</span> <span class="o">=</span> <span class="kc">False</span>
                <span class="k">for</span> <span class="p">(</span><span class="n">k</span><span class="p">,</span> <span class="n">point</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">key_points</span><span class="p">):</span>
                    <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">vert</span><span class="p">,</span> <span class="n">point</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">):</span>
                        <span class="n">bz_as_key_point_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="p">)</span>
                        <span class="n">duplicatevert</span> <span class="o">=</span> <span class="kc">True</span>
                        <span class="k">break</span>
                <span class="k">for</span> <span class="p">(</span><span class="n">k</span><span class="p">,</span> <span class="n">point</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">key_points</span><span class="p">):</span>
                    <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">edge_center</span><span class="p">,</span> <span class="n">point</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">):</span>
                        <span class="n">bz_as_key_point_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="p">)</span>
                        <span class="n">duplicateedge</span> <span class="o">=</span> <span class="kc">True</span>
                        <span class="k">break</span>
                <span class="k">if</span> <span class="ow">not</span> <span class="n">duplicatevert</span><span class="p">:</span>
                    <span class="n">key_points</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">vert</span><span class="p">)</span>
                    <span class="n">bz_as_key_point_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
                <span class="k">if</span> <span class="ow">not</span> <span class="n">duplicateedge</span><span class="p">:</span>
                    <span class="n">key_points</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">edge_center</span><span class="p">)</span>
                    <span class="n">bz_as_key_point_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
            <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">facet</span><span class="p">)</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>  <span class="c1"># parallelogram facet</span>
                <span class="n">face_center</span> <span class="o">=</span> <span class="p">(</span><span class="n">facet</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">+</span> <span class="n">facet</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> <span class="n">facet</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">+</span> <span class="n">facet</span><span class="p">[</span><span class="mi">3</span><span class="p">])</span> <span class="o">/</span> <span class="mf">4.0</span>
                <span class="n">key_points</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">face_center</span><span class="p">)</span>
                <span class="n">face_center_inds</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
                <span class="n">bz_as_key_point_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
            <span class="k">else</span><span class="p">:</span>  <span class="c1"># hexagonal facet</span>
                <span class="n">face_center</span> <span class="o">=</span> <span class="p">(</span><span class="n">facet</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">+</span> <span class="n">facet</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> <span class="n">facet</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">+</span> <span class="n">facet</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">+</span> <span class="n">facet</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">+</span> <span class="n">facet</span><span class="p">[</span><span class="mi">5</span><span class="p">])</span> <span class="o">/</span> <span class="mf">6.0</span>
                <span class="n">key_points</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">face_center</span><span class="p">)</span>
                <span class="n">face_center_inds</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
                <span class="n">bz_as_key_point_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>

        <span class="c1"># add gamma point</span>
        <span class="n">key_points</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">]))</span>
        <span class="k">return</span> <span class="n">key_points</span><span class="p">,</span> <span class="n">bz_as_key_point_inds</span><span class="p">,</span> <span class="n">face_center_inds</span>

    <span class="k">def</span> <span class="nf">_get_key_point_orbits</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key_points</span><span class="p">):</span>
        <span class="n">key_points_copy</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="nb">zip</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">),</span> <span class="n">key_points</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]))</span>
        <span class="c1"># gamma not equivalent to any on BZ and is last point added to</span>
        <span class="c1"># key_points</span>
        <span class="n">key_points_inds_orbits</span> <span class="o">=</span> <span class="p">[]</span>

        <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
        <span class="k">while</span> <span class="nb">len</span><span class="p">(</span><span class="n">key_points_copy</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
            <span class="n">key_points_inds_orbits</span><span class="o">.</span><span class="n">append</span><span class="p">([])</span>
            <span class="n">k0ind</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">key_points_copy</span><span class="o">.</span><span class="n">keys</span><span class="p">())[</span><span class="mi">0</span><span class="p">]</span>
            <span class="n">k0</span> <span class="o">=</span> <span class="n">key_points_copy</span><span class="p">[</span><span class="n">k0ind</span><span class="p">]</span>
            <span class="n">key_points_inds_orbits</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k0ind</span><span class="p">)</span>
            <span class="n">key_points_copy</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">k0ind</span><span class="p">)</span>

            <span class="k">for</span> <span class="n">op</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rpg</span><span class="p">:</span>
                <span class="n">to_pop</span> <span class="o">=</span> <span class="p">[]</span>
                <span class="n">k1</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">k0</span><span class="p">)</span>
                <span class="k">for</span> <span class="n">ind_key</span> <span class="ow">in</span> <span class="n">key_points_copy</span><span class="p">:</span>
                    <span class="n">diff</span> <span class="o">=</span> <span class="n">k1</span> <span class="o">-</span> <span class="n">key_points_copy</span><span class="p">[</span><span class="n">ind_key</span><span class="p">]</span>
                    <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_all_ints</span><span class="p">(</span><span class="n">diff</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">):</span>
                        <span class="n">key_points_inds_orbits</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ind_key</span><span class="p">)</span>
                        <span class="n">to_pop</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ind_key</span><span class="p">)</span>

                <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">to_pop</span><span class="p">:</span>
                    <span class="n">key_points_copy</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
            <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>

        <span class="n">key_points_inds_orbits</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">])</span>

        <span class="k">return</span> <span class="n">key_points_inds_orbits</span>

    <span class="k">def</span> <span class="nf">_get_key_lines</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key_points</span><span class="p">,</span> <span class="n">bz_as_key_point_inds</span><span class="p">):</span>
        <span class="n">key_lines</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">gamma_ind</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">key_points</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span>

        <span class="k">for</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">facet_as_key_point_inds</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">bz_as_key_point_inds</span><span class="p">):</span>
            <span class="n">facet_as_key_point_inds_bndy</span> <span class="o">=</span> <span class="n">facet_as_key_point_inds</span><span class="p">[:</span> <span class="nb">len</span><span class="p">(</span><span class="n">facet_as_key_point_inds</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span>
            <span class="c1"># not the face center point (don&#39;t need to check it since it&#39;s not</span>
            <span class="c1"># shared with other facets)</span>
            <span class="n">face_center_ind</span> <span class="o">=</span> <span class="n">facet_as_key_point_inds</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
            <span class="k">for</span> <span class="p">(</span><span class="n">j</span><span class="p">,</span> <span class="n">ind</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">facet_as_key_point_inds_bndy</span><span class="p">):</span>
                <span class="k">if</span> <span class="p">(</span>
                        <span class="nb">min</span><span class="p">(</span><span class="n">ind</span><span class="p">,</span> <span class="n">facet_as_key_point_inds_bndy</span><span class="p">[</span><span class="n">j</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]),</span>
                        <span class="nb">max</span><span class="p">(</span><span class="n">ind</span><span class="p">,</span> <span class="n">facet_as_key_point_inds_bndy</span><span class="p">[</span><span class="n">j</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]),</span>
                <span class="p">)</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">key_lines</span><span class="p">:</span>
                    <span class="n">key_lines</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
                        <span class="p">(</span><span class="nb">min</span><span class="p">(</span><span class="n">ind</span><span class="p">,</span> <span class="n">facet_as_key_point_inds_bndy</span><span class="p">[</span><span class="n">j</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]),</span> <span class="nb">max</span><span class="p">(</span><span class="n">ind</span><span class="p">,</span> <span class="n">facet_as_key_point_inds_bndy</span><span class="p">[</span><span class="n">j</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]),)</span>
                    <span class="p">)</span>
                <span class="n">k</span> <span class="o">=</span> <span class="n">j</span> <span class="o">+</span> <span class="mi">1</span> <span class="k">if</span> <span class="n">j</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">facet_as_key_point_inds_bndy</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span> <span class="k">else</span> <span class="mi">0</span>
                <span class="k">if</span> <span class="p">(</span>
                        <span class="nb">min</span><span class="p">(</span><span class="n">ind</span><span class="p">,</span> <span class="n">facet_as_key_point_inds_bndy</span><span class="p">[</span><span class="n">k</span><span class="p">]),</span>
                        <span class="nb">max</span><span class="p">(</span><span class="n">ind</span><span class="p">,</span> <span class="n">facet_as_key_point_inds_bndy</span><span class="p">[</span><span class="n">k</span><span class="p">]),</span>
                <span class="p">)</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">key_lines</span><span class="p">:</span>
                    <span class="n">key_lines</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
                        <span class="p">(</span><span class="nb">min</span><span class="p">(</span><span class="n">ind</span><span class="p">,</span> <span class="n">facet_as_key_point_inds_bndy</span><span class="p">[</span><span class="n">k</span><span class="p">]),</span> <span class="nb">max</span><span class="p">(</span><span class="n">ind</span><span class="p">,</span> <span class="n">facet_as_key_point_inds_bndy</span><span class="p">[</span><span class="n">k</span><span class="p">]),)</span>
                    <span class="p">)</span>
                <span class="k">if</span> <span class="p">(</span><span class="n">ind</span><span class="p">,</span> <span class="n">gamma_ind</span><span class="p">)</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">key_lines</span><span class="p">:</span>
                    <span class="n">key_lines</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">ind</span><span class="p">,</span> <span class="n">gamma_ind</span><span class="p">))</span>
                <span class="n">key_lines</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="nb">min</span><span class="p">(</span><span class="n">ind</span><span class="p">,</span> <span class="n">face_center_ind</span><span class="p">),</span> <span class="nb">max</span><span class="p">(</span><span class="n">ind</span><span class="p">,</span> <span class="n">face_center_ind</span><span class="p">)))</span>
            <span class="n">key_lines</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">face_center_ind</span><span class="p">,</span> <span class="n">gamma_ind</span><span class="p">))</span>

        <span class="k">return</span> <span class="n">key_lines</span>

    <span class="k">def</span> <span class="nf">_get_key_line_orbits</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key_points</span><span class="p">,</span> <span class="n">key_lines</span><span class="p">,</span> <span class="n">key_points_inds_orbits</span><span class="p">):</span>
        <span class="n">key_lines_copy</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="nb">zip</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_lines</span><span class="p">)),</span> <span class="n">key_lines</span><span class="p">))</span>
        <span class="n">key_lines_inds_orbits</span> <span class="o">=</span> <span class="p">[]</span>

        <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
        <span class="k">while</span> <span class="nb">len</span><span class="p">(</span><span class="n">key_lines_copy</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
            <span class="n">key_lines_inds_orbits</span><span class="o">.</span><span class="n">append</span><span class="p">([])</span>
            <span class="n">l0ind</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">key_lines_copy</span><span class="o">.</span><span class="n">keys</span><span class="p">())[</span><span class="mi">0</span><span class="p">]</span>
            <span class="n">l0</span> <span class="o">=</span> <span class="n">key_lines_copy</span><span class="p">[</span><span class="n">l0ind</span><span class="p">]</span>
            <span class="n">key_lines_inds_orbits</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">l0</span><span class="p">)</span>
            <span class="n">key_lines_copy</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">l0ind</span><span class="p">)</span>
            <span class="n">to_pop</span> <span class="o">=</span> <span class="p">[]</span>
            <span class="n">p00</span> <span class="o">=</span> <span class="n">key_points</span><span class="p">[</span><span class="n">l0</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span>
            <span class="n">p01</span> <span class="o">=</span> <span class="n">key_points</span><span class="p">[</span><span class="n">l0</span><span class="p">[</span><span class="mi">1</span><span class="p">]]</span>
            <span class="n">pmid0</span> <span class="o">=</span> <span class="n">p00</span> <span class="o">+</span> <span class="n">e</span> <span class="o">/</span> <span class="n">pi</span> <span class="o">*</span> <span class="p">(</span><span class="n">p01</span> <span class="o">-</span> <span class="n">p00</span><span class="p">)</span>
            <span class="k">for</span> <span class="n">ind_key</span> <span class="ow">in</span> <span class="n">key_lines_copy</span><span class="p">:</span>

                <span class="n">l1</span> <span class="o">=</span> <span class="n">key_lines_copy</span><span class="p">[</span><span class="n">ind_key</span><span class="p">]</span>
                <span class="n">p10</span> <span class="o">=</span> <span class="n">key_points</span><span class="p">[</span><span class="n">l1</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span>
                <span class="n">p11</span> <span class="o">=</span> <span class="n">key_points</span><span class="p">[</span><span class="n">l1</span><span class="p">[</span><span class="mi">1</span><span class="p">]]</span>
                <span class="n">equivptspar</span> <span class="o">=</span> <span class="kc">False</span>
                <span class="n">equivptsperp</span> <span class="o">=</span> <span class="kc">False</span>
                <span class="n">equivline</span> <span class="o">=</span> <span class="kc">False</span>

                <span class="k">if</span> <span class="p">(</span>
                        <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">l0</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="n">orbit</span> <span class="ow">and</span> <span class="n">l1</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="n">orbit</span> <span class="k">for</span> <span class="n">orbit</span> <span class="ow">in</span> <span class="n">key_points_inds_orbits</span><span class="p">])</span><span class="o">.</span><span class="n">any</span><span class="p">()</span>
                        <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">l0</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="ow">in</span> <span class="n">orbit</span> <span class="ow">and</span> <span class="n">l1</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="ow">in</span> <span class="n">orbit</span> <span class="k">for</span> <span class="n">orbit</span> <span class="ow">in</span> <span class="n">key_points_inds_orbits</span><span class="p">])</span><span class="o">.</span><span class="n">any</span><span class="p">()</span>
                <span class="p">):</span>
                    <span class="n">equivptspar</span> <span class="o">=</span> <span class="kc">True</span>
                <span class="k">elif</span> <span class="p">(</span>
                        <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">l0</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="ow">in</span> <span class="n">orbit</span> <span class="ow">and</span> <span class="n">l1</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="n">orbit</span> <span class="k">for</span> <span class="n">orbit</span> <span class="ow">in</span> <span class="n">key_points_inds_orbits</span><span class="p">])</span><span class="o">.</span><span class="n">any</span><span class="p">()</span>
                        <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">l0</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="n">orbit</span> <span class="ow">and</span> <span class="n">l1</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="ow">in</span> <span class="n">orbit</span> <span class="k">for</span> <span class="n">orbit</span> <span class="ow">in</span> <span class="n">key_points_inds_orbits</span><span class="p">])</span><span class="o">.</span><span class="n">any</span><span class="p">()</span>
                <span class="p">):</span>
                    <span class="n">equivptsperp</span> <span class="o">=</span> <span class="kc">True</span>

                <span class="k">if</span> <span class="n">equivptspar</span><span class="p">:</span>
                    <span class="n">pmid1</span> <span class="o">=</span> <span class="n">p10</span> <span class="o">+</span> <span class="n">e</span> <span class="o">/</span> <span class="n">pi</span> <span class="o">*</span> <span class="p">(</span><span class="n">p11</span> <span class="o">-</span> <span class="n">p10</span><span class="p">)</span>
                    <span class="k">for</span> <span class="n">op</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rpg</span><span class="p">:</span>
                        <span class="k">if</span> <span class="ow">not</span> <span class="n">equivline</span><span class="p">:</span>
                            <span class="n">p00pr</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">p00</span><span class="p">)</span>
                            <span class="n">diff0</span> <span class="o">=</span> <span class="n">p10</span> <span class="o">-</span> <span class="n">p00pr</span>
                            <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_all_ints</span><span class="p">(</span><span class="n">diff0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">):</span>
                                <span class="n">pmid0pr</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">pmid0</span><span class="p">)</span> <span class="o">+</span> <span class="n">diff0</span>
                                <span class="n">p01pr</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">p01</span><span class="p">)</span> <span class="o">+</span> <span class="n">diff0</span>
                                <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">p11</span><span class="p">,</span> <span class="n">p01pr</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">)</span> <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span>
                                        <span class="n">pmid1</span><span class="p">,</span> <span class="n">pmid0pr</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span>
                                <span class="p">):</span>
                                    <span class="n">equivline</span> <span class="o">=</span> <span class="kc">True</span>

                <span class="k">elif</span> <span class="n">equivptsperp</span><span class="p">:</span>
                    <span class="n">pmid1</span> <span class="o">=</span> <span class="n">p11</span> <span class="o">+</span> <span class="n">e</span> <span class="o">/</span> <span class="n">pi</span> <span class="o">*</span> <span class="p">(</span><span class="n">p10</span> <span class="o">-</span> <span class="n">p11</span><span class="p">)</span>
                    <span class="k">for</span> <span class="n">op</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rpg</span><span class="p">:</span>
                        <span class="k">if</span> <span class="ow">not</span> <span class="n">equivline</span><span class="p">:</span>
                            <span class="n">p00pr</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">p00</span><span class="p">)</span>
                            <span class="n">diff0</span> <span class="o">=</span> <span class="n">p11</span> <span class="o">-</span> <span class="n">p00pr</span>
                            <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_all_ints</span><span class="p">(</span><span class="n">diff0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">):</span>
                                <span class="n">pmid0pr</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">pmid0</span><span class="p">)</span> <span class="o">+</span> <span class="n">diff0</span>
                                <span class="n">p01pr</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">p01</span><span class="p">)</span> <span class="o">+</span> <span class="n">diff0</span>
                                <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">p10</span><span class="p">,</span> <span class="n">p01pr</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">)</span> <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span>
                                        <span class="n">pmid1</span><span class="p">,</span> <span class="n">pmid0pr</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span>
                                <span class="p">):</span>
                                    <span class="n">equivline</span> <span class="o">=</span> <span class="kc">True</span>

                <span class="k">if</span> <span class="n">equivline</span><span class="p">:</span>
                    <span class="n">key_lines_inds_orbits</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">l1</span><span class="p">)</span>
                    <span class="n">to_pop</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ind_key</span><span class="p">)</span>

            <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">to_pop</span><span class="p">:</span>
                <span class="n">key_lines_copy</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
            <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>

        <span class="k">return</span> <span class="n">key_lines_inds_orbits</span>

    <span class="k">def</span> <span class="nf">_get_little_groups</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key_points</span><span class="p">,</span> <span class="n">key_points_inds_orbits</span><span class="p">,</span> <span class="n">key_lines_inds_orbits</span><span class="p">):</span>

        <span class="n">little_groups_points</span> <span class="o">=</span> <span class="p">[]</span>  <span class="c1"># elements are lists of indicies of recip_point_group. the</span>
        <span class="c1"># list little_groups_points[i] is the little group for the</span>
        <span class="c1"># orbit key_points_inds_orbits[i]</span>
        <span class="k">for</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">orbit</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">key_points_inds_orbits</span><span class="p">):</span>
            <span class="n">k0</span> <span class="o">=</span> <span class="n">key_points</span><span class="p">[</span><span class="n">orbit</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span>
            <span class="n">little_groups_points</span><span class="o">.</span><span class="n">append</span><span class="p">([])</span>
            <span class="k">for</span> <span class="p">(</span><span class="n">j</span><span class="p">,</span> <span class="n">op</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_rpg</span><span class="p">):</span>
                <span class="n">gamma_to</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">k0</span><span class="p">)</span> <span class="o">+</span> <span class="n">k0</span>
                <span class="n">check_gamma</span> <span class="o">=</span> <span class="kc">True</span>
                <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_all_ints</span><span class="p">(</span><span class="n">gamma_to</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">):</span>
                    <span class="n">check_gamma</span> <span class="o">=</span> <span class="kc">False</span>
                <span class="k">if</span> <span class="n">check_gamma</span><span class="p">:</span>
                    <span class="n">little_groups_points</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">j</span><span class="p">)</span>

        <span class="c1"># elements are lists of indicies of recip_point_group. the list</span>
        <span class="c1"># little_groups_lines[i] is</span>
        <span class="n">little_groups_lines</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="c1"># the little group for the orbit key_points_inds_lines[i]</span>

        <span class="k">for</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">orbit</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">key_lines_inds_orbits</span><span class="p">):</span>
            <span class="n">l0</span> <span class="o">=</span> <span class="n">orbit</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
            <span class="n">v</span> <span class="o">=</span> <span class="n">key_points</span><span class="p">[</span><span class="n">l0</span><span class="p">[</span><span class="mi">1</span><span class="p">]]</span> <span class="o">-</span> <span class="n">key_points</span><span class="p">[</span><span class="n">l0</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span>
            <span class="n">k0</span> <span class="o">=</span> <span class="n">key_points</span><span class="p">[</span><span class="n">l0</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span> <span class="o">+</span> <span class="n">np</span><span class="o">.</span><span class="n">e</span> <span class="o">/</span> <span class="n">pi</span> <span class="o">*</span> <span class="n">v</span>
            <span class="n">little_groups_lines</span><span class="o">.</span><span class="n">append</span><span class="p">([])</span>
            <span class="k">for</span> <span class="p">(</span><span class="n">j</span><span class="p">,</span> <span class="n">op</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_rpg</span><span class="p">):</span>
                <span class="n">gamma_to</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">k0</span><span class="p">)</span> <span class="o">+</span> <span class="n">k0</span>
                <span class="n">check_gamma</span> <span class="o">=</span> <span class="kc">True</span>
                <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_all_ints</span><span class="p">(</span><span class="n">gamma_to</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">):</span>
                    <span class="n">check_gamma</span> <span class="o">=</span> <span class="kc">False</span>
                <span class="k">if</span> <span class="n">check_gamma</span><span class="p">:</span>
                    <span class="n">little_groups_lines</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">j</span><span class="p">)</span>

        <span class="k">return</span> <span class="n">little_groups_points</span><span class="p">,</span> <span class="n">little_groups_lines</span>

    <span class="k">def</span> <span class="nf">_convert_all_magmoms_to_vectors</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">magmom_axis</span><span class="p">,</span> <span class="n">axis_specified</span><span class="p">):</span>
        <span class="n">struct</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_structure</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
        <span class="n">magmom_axis</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">magmom_axis</span><span class="p">)</span>
        <span class="k">if</span> <span class="s2">&quot;magmom&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">struct</span><span class="o">.</span><span class="n">site_properties</span><span class="p">:</span>
            <span class="n">warn</span><span class="p">(</span>
                <span class="s2">&quot;The &#39;magmom&#39; property is not set in the structure&#39;s site properties.&quot;</span>
                <span class="s2">&quot;All magnetic moments are being set to zero.&quot;</span>
            <span class="p">)</span>
            <span class="n">struct</span><span class="o">.</span><span class="n">add_site_property</span><span class="p">(</span><span class="s2">&quot;magmom&quot;</span><span class="p">,</span> <span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">])</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">struct</span><span class="o">.</span><span class="n">sites</span><span class="p">))])</span>

            <span class="k">return</span> <span class="n">struct</span>

        <span class="n">old_magmoms</span> <span class="o">=</span> <span class="n">struct</span><span class="o">.</span><span class="n">site_properties</span><span class="p">[</span><span class="s2">&quot;magmom&quot;</span><span class="p">]</span>
        <span class="n">new_magmoms</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">found_scalar</span> <span class="o">=</span> <span class="kc">False</span>

        <span class="k">for</span> <span class="n">magmom</span> <span class="ow">in</span> <span class="n">old_magmoms</span><span class="p">:</span>
            <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">magmom</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">):</span>
                <span class="n">new_magmoms</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">magmom</span><span class="p">)</span>
            <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">magmom</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
                <span class="n">new_magmoms</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">magmom</span><span class="p">))</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">found_scalar</span> <span class="o">=</span> <span class="kc">True</span>
                <span class="n">new_magmoms</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">magmom</span> <span class="o">*</span> <span class="n">magmom_axis</span><span class="p">)</span>

        <span class="k">if</span> <span class="n">found_scalar</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">axis_specified</span><span class="p">:</span>
            <span class="n">warn</span><span class="p">(</span><span class="s2">&quot;At least one magmom had a scalar value and magmom_axis was not specified.&quot;</span> <span class="s2">&quot;Defaulted to z+ spinor.&quot;</span><span class="p">)</span>

        <span class="n">struct</span><span class="o">.</span><span class="n">remove_site_property</span><span class="p">(</span><span class="s2">&quot;magmom&quot;</span><span class="p">)</span>
        <span class="n">struct</span><span class="o">.</span><span class="n">add_site_property</span><span class="p">(</span><span class="s2">&quot;magmom&quot;</span><span class="p">,</span> <span class="n">new_magmoms</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">struct</span>

    <span class="k">def</span> <span class="nf">_get_magnetic_symmetry_operations</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">struct</span><span class="p">,</span> <span class="n">grey_ops</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
        <span class="n">mag_ops</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">magmoms</span> <span class="o">=</span> <span class="n">struct</span><span class="o">.</span><span class="n">site_properties</span><span class="p">[</span><span class="s2">&quot;magmom&quot;</span><span class="p">]</span>
        <span class="n">nonzero_magmom_inds</span> <span class="o">=</span> <span class="p">[</span><span class="n">i</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">struct</span><span class="o">.</span><span class="n">sites</span><span class="p">))</span> <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">magmoms</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">]))</span><span class="o">.</span><span class="n">all</span><span class="p">()]</span>
        <span class="n">init_magmoms</span> <span class="o">=</span> <span class="p">[</span><span class="n">site</span><span class="o">.</span><span class="n">properties</span><span class="p">[</span><span class="s2">&quot;magmom&quot;</span><span class="p">]</span> <span class="k">for</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">site</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">struct</span><span class="o">.</span><span class="n">sites</span><span class="p">)</span> <span class="k">if</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">nonzero_magmom_inds</span><span class="p">]</span>
        <span class="n">sites</span> <span class="o">=</span> <span class="p">[</span><span class="n">site</span> <span class="k">for</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">site</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">struct</span><span class="o">.</span><span class="n">sites</span><span class="p">)</span> <span class="k">if</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">nonzero_magmom_inds</span><span class="p">]</span>
        <span class="n">init_site_coords</span> <span class="o">=</span> <span class="p">[</span><span class="n">site</span><span class="o">.</span><span class="n">frac_coords</span> <span class="k">for</span> <span class="n">site</span> <span class="ow">in</span> <span class="n">sites</span><span class="p">]</span>
        <span class="k">for</span> <span class="n">op</span> <span class="ow">in</span> <span class="n">grey_ops</span><span class="p">:</span>
            <span class="n">r</span> <span class="o">=</span> <span class="n">op</span><span class="o">.</span><span class="n">rotation_matrix</span>
            <span class="n">t</span> <span class="o">=</span> <span class="n">op</span><span class="o">.</span><span class="n">translation_vector</span>
            <span class="n">xformed_magmoms</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_apply_op_to_magmom</span><span class="p">(</span><span class="n">r</span><span class="p">,</span> <span class="n">magmom</span><span class="p">)</span> <span class="k">for</span> <span class="n">magmom</span> <span class="ow">in</span> <span class="n">init_magmoms</span><span class="p">]</span>
            <span class="n">xformed_site_coords</span> <span class="o">=</span> <span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">r</span><span class="p">,</span> <span class="n">site</span><span class="o">.</span><span class="n">frac_coords</span><span class="p">)</span> <span class="o">+</span> <span class="n">t</span> <span class="k">for</span> <span class="n">site</span> <span class="ow">in</span> <span class="n">sites</span><span class="p">]</span>
            <span class="n">permutation</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;a&quot;</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">sites</span><span class="p">))]</span>
            <span class="n">not_found</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">sites</span><span class="p">)))</span>
            <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">sites</span><span class="p">)):</span>
                <span class="n">xformed</span> <span class="o">=</span> <span class="n">xformed_site_coords</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
                <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">not_found</span><span class="p">):</span>
                    <span class="n">init</span> <span class="o">=</span> <span class="n">init_site_coords</span><span class="p">[</span><span class="n">j</span><span class="p">]</span>
                    <span class="n">diff</span> <span class="o">=</span> <span class="n">xformed</span> <span class="o">-</span> <span class="n">init</span>
                    <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_all_ints</span><span class="p">(</span><span class="n">diff</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                        <span class="n">permutation</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">j</span>
                        <span class="n">not_found</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">k</span><span class="p">)</span>
                        <span class="k">break</span>

            <span class="n">same</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">sites</span><span class="p">))</span>
            <span class="n">flipped</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">sites</span><span class="p">))</span>
            <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">magmom</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">xformed_magmoms</span><span class="p">):</span>
                <span class="k">if</span> <span class="p">(</span><span class="n">magmom</span> <span class="o">==</span> <span class="n">init_magmoms</span><span class="p">[</span><span class="n">permutation</span><span class="p">[</span><span class="n">i</span><span class="p">]])</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>
                    <span class="n">same</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span>
                <span class="k">elif</span> <span class="p">(</span><span class="n">magmom</span> <span class="o">==</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">init_magmoms</span><span class="p">[</span><span class="n">permutation</span><span class="p">[</span><span class="n">i</span><span class="p">]])</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>
                    <span class="n">flipped</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span>

            <span class="k">if</span> <span class="n">same</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>  <span class="c1"># add symm op without tr</span>
                <span class="n">mag_ops</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
                    <span class="n">MagSymmOp</span><span class="o">.</span><span class="n">from_rotation_and_translation_and_time_reversal</span><span class="p">(</span>
                        <span class="n">rotation_matrix</span><span class="o">=</span><span class="n">op</span><span class="o">.</span><span class="n">rotation_matrix</span><span class="p">,</span> <span class="n">translation_vec</span><span class="o">=</span><span class="n">op</span><span class="o">.</span><span class="n">translation_vector</span><span class="p">,</span> <span class="n">time_reversal</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
                    <span class="p">)</span>
                <span class="p">)</span>
            <span class="k">if</span> <span class="n">flipped</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>  <span class="c1"># add symm op with tr</span>
                <span class="n">mag_ops</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
                    <span class="n">MagSymmOp</span><span class="o">.</span><span class="n">from_rotation_and_translation_and_time_reversal</span><span class="p">(</span>
                        <span class="n">rotation_matrix</span><span class="o">=</span><span class="n">op</span><span class="o">.</span><span class="n">rotation_matrix</span><span class="p">,</span> <span class="n">translation_vec</span><span class="o">=</span><span class="n">op</span><span class="o">.</span><span class="n">translation_vector</span><span class="p">,</span> <span class="n">time_reversal</span><span class="o">=-</span><span class="mi">1</span><span class="p">,</span>
                    <span class="p">)</span>
                <span class="p">)</span>

        <span class="k">return</span> <span class="n">mag_ops</span>

    <span class="k">def</span> <span class="nf">_get_reciprocal_point_group</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">ops</span><span class="p">,</span> <span class="n">R</span><span class="p">,</span> <span class="n">A</span><span class="p">):</span>

        <span class="n">Ainv</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">inv</span><span class="p">(</span><span class="n">A</span><span class="p">)</span>
        <span class="c1"># convert to reciprocal primitive basis</span>
        <span class="n">recip_point_group</span> <span class="o">=</span> <span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">around</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">A</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">R</span><span class="p">,</span> <span class="n">Ainv</span><span class="p">)),</span> <span class="n">decimals</span><span class="o">=</span><span class="mi">2</span><span class="p">)]</span>
        <span class="k">for</span> <span class="n">op</span> <span class="ow">in</span> <span class="n">ops</span><span class="p">:</span>
            <span class="n">op</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">around</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">A</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">Ainv</span><span class="p">)),</span> <span class="n">decimals</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
            <span class="n">new</span> <span class="o">=</span> <span class="kc">True</span>
            <span class="n">new_coset</span> <span class="o">=</span> <span class="kc">True</span>
            <span class="k">for</span> <span class="n">thing</span> <span class="ow">in</span> <span class="n">recip_point_group</span><span class="p">:</span>
                <span class="k">if</span> <span class="p">(</span><span class="n">thing</span> <span class="o">==</span> <span class="n">op</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>
                    <span class="n">new</span> <span class="o">=</span> <span class="kc">False</span>
                <span class="k">if</span> <span class="p">(</span><span class="n">thing</span> <span class="o">==</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">R</span><span class="p">,</span> <span class="n">op</span><span class="p">))</span><span class="o">.</span><span class="n">all</span><span class="p">():</span>
                    <span class="n">new_coset</span> <span class="o">=</span> <span class="kc">False</span>

            <span class="k">if</span> <span class="n">new</span><span class="p">:</span>
                <span class="n">recip_point_group</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">op</span><span class="p">)</span>
            <span class="k">if</span> <span class="n">new_coset</span><span class="p">:</span>
                <span class="n">recip_point_group</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">R</span><span class="p">,</span> <span class="n">op</span><span class="p">))</span>

        <span class="k">return</span> <span class="n">recip_point_group</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_closewrapped</span><span class="p">(</span><span class="n">pos1</span><span class="p">,</span> <span class="n">pos2</span><span class="p">,</span> <span class="n">tolerance</span><span class="p">):</span>
        <span class="n">pos1</span> <span class="o">=</span> <span class="n">pos1</span> <span class="o">%</span> <span class="mf">1.0</span>
        <span class="n">pos2</span> <span class="o">=</span> <span class="n">pos2</span> <span class="o">%</span> <span class="mf">1.0</span>

        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">pos1</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">pos2</span><span class="p">):</span>
            <span class="k">return</span> <span class="kc">False</span>
        <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">pos1</span><span class="p">):</span>
            <span class="k">if</span> <span class="nb">abs</span><span class="p">(</span><span class="n">pos1</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">-</span> <span class="n">pos2</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">&gt;</span> <span class="n">tolerance</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="ow">and</span> <span class="nb">abs</span><span class="p">(</span><span class="n">pos1</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">-</span> <span class="n">pos2</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">&lt;</span> <span class="mf">1.0</span> <span class="o">-</span> <span class="n">tolerance</span><span class="p">[</span><span class="n">i</span><span class="p">]:</span>
                <span class="k">return</span> <span class="kc">False</span>
        <span class="k">return</span> <span class="kc">True</span>

    <span class="k">def</span> <span class="nf">_get_coset_factor</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">G</span><span class="p">,</span> <span class="n">H</span><span class="p">):</span>
        <span class="c1"># finds g for left coset decomposition G = H + gH (H must be subgroup of G with index two.)</span>
        <span class="c1"># in this implementation, G and H are lists of objects of type</span>
        <span class="c1"># SymmOp</span>
        <span class="n">gH</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">op1</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">G</span><span class="p">):</span>
            <span class="n">in_H</span> <span class="o">=</span> <span class="kc">False</span>
            <span class="k">for</span> <span class="n">op2</span> <span class="ow">in</span> <span class="n">H</span><span class="p">:</span>
                <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">op1</span><span class="o">.</span><span class="n">rotation_matrix</span><span class="p">,</span> <span class="n">op2</span><span class="o">.</span><span class="n">rotation_matrix</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">)</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_closewrapped</span><span class="p">(</span>
                        <span class="n">op1</span><span class="o">.</span><span class="n">translation_vector</span><span class="p">,</span> <span class="n">op2</span><span class="o">.</span><span class="n">translation_vector</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">ones</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span> <span class="o">*</span> <span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">,</span>
                <span class="p">):</span>
                    <span class="n">in_H</span> <span class="o">=</span> <span class="kc">True</span>
                    <span class="k">break</span>
            <span class="k">if</span> <span class="ow">not</span> <span class="n">in_H</span><span class="p">:</span>
                <span class="n">gH</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">op1</span><span class="p">)</span>

        <span class="k">for</span> <span class="n">op</span> <span class="ow">in</span> <span class="n">gH</span><span class="p">:</span>
            <span class="n">opH</span> <span class="o">=</span> <span class="p">[</span><span class="n">op</span><span class="o">.</span><span class="fm">__mul__</span><span class="p">(</span><span class="n">h</span><span class="p">)</span> <span class="k">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">H</span><span class="p">]</span>
            <span class="n">is_coset_factor</span> <span class="o">=</span> <span class="kc">True</span>
            <span class="k">for</span> <span class="n">op1</span> <span class="ow">in</span> <span class="n">opH</span><span class="p">:</span>
                <span class="k">for</span> <span class="n">op2</span> <span class="ow">in</span> <span class="n">H</span><span class="p">:</span>
                    <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">op1</span><span class="o">.</span><span class="n">rotation_matrix</span><span class="p">,</span> <span class="n">op2</span><span class="o">.</span><span class="n">rotation_matrix</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">)</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_closewrapped</span><span class="p">(</span>
                            <span class="n">op1</span><span class="o">.</span><span class="n">translation_vector</span><span class="p">,</span> <span class="n">op2</span><span class="o">.</span><span class="n">translation_vector</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">ones</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span> <span class="o">*</span> <span class="bp">self</span><span class="o">.</span><span class="n">_atol</span><span class="p">,</span>
                    <span class="p">):</span>

                        <span class="n">is_coset_factor</span> <span class="o">=</span> <span class="kc">False</span>
                        <span class="k">break</span>
                <span class="k">if</span> <span class="ow">not</span> <span class="n">is_coset_factor</span><span class="p">:</span>
                    <span class="k">break</span>
            <span class="k">if</span> <span class="n">is_coset_factor</span><span class="p">:</span>
                <span class="k">return</span> <span class="n">op</span>

        <span class="k">return</span> <span class="s2">&quot;No coset factor found.&quot;</span>

    <span class="k">def</span> <span class="nf">_apply_op_to_magmom</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">r</span><span class="p">,</span> <span class="n">magmom</span><span class="p">):</span>
        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">det</span><span class="p">(</span><span class="n">r</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">r</span><span class="p">,</span> <span class="n">magmom</span><span class="p">)</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="k">return</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">r</span><span class="p">,</span> <span class="n">magmom</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">_all_ints</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">arr</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
        <span class="n">rounded_arr</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">around</span><span class="p">(</span><span class="n">arr</span><span class="p">,</span> <span class="n">decimals</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">rounded_arr</span><span class="p">,</span> <span class="n">arr</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">_get_IRBZ</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">recip_point_group</span><span class="p">,</span> <span class="n">W</span><span class="p">,</span> <span class="n">key_points</span><span class="p">,</span> <span class="n">face_center_inds</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
        <span class="n">rpgdict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_reciprocal_point_group_dict</span><span class="p">(</span><span class="n">recip_point_group</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>

        <span class="n">g</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">W</span><span class="o">.</span><span class="n">T</span><span class="p">,</span> <span class="n">W</span><span class="p">)</span>  <span class="c1"># just using change of basis matrix rather than</span>
        <span class="c1"># Lattice.get_cartesian_coordinates for conciseness</span>
        <span class="n">ginv</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">inv</span><span class="p">(</span><span class="n">g</span><span class="p">)</span>
        <span class="n">D</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">det</span><span class="p">(</span><span class="n">W</span><span class="p">)</span>

        <span class="n">primary_orientation</span> <span class="o">=</span> <span class="kc">None</span>
        <span class="n">secondary_orientation</span> <span class="o">=</span> <span class="kc">None</span>
        <span class="n">tertiary_orientation</span> <span class="o">=</span> <span class="kc">None</span>

        <span class="n">planar_boundaries</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">IRBZ_points</span> <span class="o">=</span> <span class="p">[(</span><span class="n">i</span><span class="p">,</span> <span class="n">point</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">point</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">key_points</span><span class="p">)]</span>

        <span class="k">for</span> <span class="n">sigma</span> <span class="ow">in</span> <span class="n">rpgdict</span><span class="p">[</span><span class="s2">&quot;reflections&quot;</span><span class="p">]:</span>
            <span class="n">norm</span> <span class="o">=</span> <span class="n">sigma</span><span class="p">[</span><span class="s2">&quot;normal&quot;</span><span class="p">]</span>
            <span class="k">if</span> <span class="n">primary_orientation</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
                <span class="n">primary_orientation</span> <span class="o">=</span> <span class="n">norm</span>
                <span class="n">planar_boundaries</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">norm</span><span class="p">)</span>
            <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">primary_orientation</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">g</span><span class="p">,</span> <span class="n">norm</span><span class="p">)),</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                <span class="k">if</span> <span class="n">secondary_orientation</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
                    <span class="n">secondary_orientation</span> <span class="o">=</span> <span class="n">norm</span>
                    <span class="n">planar_boundaries</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">norm</span><span class="p">)</span>
                <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">secondary_orientation</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">g</span><span class="p">,</span> <span class="n">norm</span><span class="p">)),</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                    <span class="k">if</span> <span class="n">tertiary_orientation</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
                        <span class="n">tertiary_orientation</span> <span class="o">=</span> <span class="n">norm</span>
                        <span class="n">planar_boundaries</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">norm</span><span class="p">)</span>
                    <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">norm</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">tertiary_orientation</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                        <span class="k">pass</span>
                <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">secondary_orientation</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">g</span><span class="p">,</span> <span class="n">norm</span><span class="p">))</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">:</span>
                    <span class="n">planar_boundaries</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">norm</span><span class="p">)</span>
                <span class="k">else</span><span class="p">:</span>
                    <span class="n">planar_boundaries</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">norm</span><span class="p">)</span>
            <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">primary_orientation</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">g</span><span class="p">,</span> <span class="n">norm</span><span class="p">))</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">:</span>
                <span class="n">planar_boundaries</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">norm</span><span class="p">)</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">planar_boundaries</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">norm</span><span class="p">)</span>

        <span class="n">IRBZ_points</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_reduce_IRBZ</span><span class="p">(</span><span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">planar_boundaries</span><span class="p">,</span> <span class="n">g</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>

        <span class="n">used_axes</span> <span class="o">=</span> <span class="p">[]</span>

        <span class="c1"># six-fold rotoinversion always comes with horizontal mirror so don&#39;t</span>
        <span class="c1"># need to check</span>
        <span class="k">for</span> <span class="n">rotn</span> <span class="ow">in</span> <span class="n">rpgdict</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;six-fold&quot;</span><span class="p">]:</span>
            <span class="n">ax</span> <span class="o">=</span> <span class="n">rotn</span><span class="p">[</span><span class="s2">&quot;axis&quot;</span><span class="p">]</span>
            <span class="n">op</span> <span class="o">=</span> <span class="n">rotn</span><span class="p">[</span><span class="s2">&quot;op&quot;</span><span class="p">]</span>
            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">any</span><span class="p">([</span><span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">usedax</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span> <span class="k">for</span> <span class="n">usedax</span> <span class="ow">in</span> <span class="n">used_axes</span><span class="p">]):</span>
                <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_op_maps_IRBZ_to_self</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
                    <span class="n">face_center_found</span> <span class="o">=</span> <span class="kc">False</span>
                    <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
                        <span class="k">if</span> <span class="n">point</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="n">face_center_inds</span><span class="p">:</span>
                            <span class="n">cross</span> <span class="o">=</span> <span class="n">D</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">ginv</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
                            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">cross</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                                <span class="n">rot_boundaries</span> <span class="o">=</span> <span class="p">[</span><span class="n">cross</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">cross</span><span class="p">)]</span>
                                <span class="n">face_center_found</span> <span class="o">=</span> <span class="kc">True</span>
                                <span class="n">used_axes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
                                <span class="k">break</span>
                    <span class="k">if</span> <span class="ow">not</span> <span class="n">face_center_found</span><span class="p">:</span>
                        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;face center not found&quot;</span><span class="p">)</span>
                        <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
                            <span class="n">cross</span> <span class="o">=</span> <span class="n">D</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">ginv</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
                            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">cross</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                                <span class="n">rot_boundaries</span> <span class="o">=</span> <span class="p">[</span><span class="n">cross</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">cross</span><span class="p">)]</span>
                                <span class="n">used_axes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
                                <span class="k">break</span>
                    <span class="n">IRBZ_points</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_reduce_IRBZ</span><span class="p">(</span><span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">rot_boundaries</span><span class="p">,</span> <span class="n">g</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>

        <span class="k">for</span> <span class="n">rotn</span> <span class="ow">in</span> <span class="n">rpgdict</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;rotoinv-four-fold&quot;</span><span class="p">]:</span>
            <span class="n">ax</span> <span class="o">=</span> <span class="n">rotn</span><span class="p">[</span><span class="s2">&quot;axis&quot;</span><span class="p">]</span>
            <span class="n">op</span> <span class="o">=</span> <span class="n">rotn</span><span class="p">[</span><span class="s2">&quot;op&quot;</span><span class="p">]</span>
            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">any</span><span class="p">([</span><span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">usedax</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span> <span class="k">for</span> <span class="n">usedax</span> <span class="ow">in</span> <span class="n">used_axes</span><span class="p">]):</span>
                <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_op_maps_IRBZ_to_self</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
                    <span class="n">face_center_found</span> <span class="o">=</span> <span class="kc">False</span>
                    <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
                        <span class="k">if</span> <span class="n">point</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="n">face_center_inds</span><span class="p">:</span>
                            <span class="n">cross</span> <span class="o">=</span> <span class="n">D</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">ginv</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
                            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">cross</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                                <span class="n">rot_boundaries</span> <span class="o">=</span> <span class="p">[</span><span class="n">cross</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">cross</span><span class="p">)]</span>
                                <span class="n">face_center_found</span> <span class="o">=</span> <span class="kc">True</span>
                                <span class="n">used_axes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
                                <span class="k">break</span>
                    <span class="k">if</span> <span class="ow">not</span> <span class="n">face_center_found</span><span class="p">:</span>
                        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;face center not found&quot;</span><span class="p">)</span>
                        <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
                            <span class="n">cross</span> <span class="o">=</span> <span class="n">D</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">ginv</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
                            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">cross</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                                <span class="n">rot_boundaries</span> <span class="o">=</span> <span class="p">[</span><span class="n">cross</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">cross</span><span class="p">)]</span>
                                <span class="n">used_axes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
                                <span class="k">break</span>
                    <span class="n">IRBZ_points</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_reduce_IRBZ</span><span class="p">(</span><span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">rot_boundaries</span><span class="p">,</span> <span class="n">g</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>

        <span class="k">for</span> <span class="n">rotn</span> <span class="ow">in</span> <span class="n">rpgdict</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;four-fold&quot;</span><span class="p">]:</span>
            <span class="n">ax</span> <span class="o">=</span> <span class="n">rotn</span><span class="p">[</span><span class="s2">&quot;axis&quot;</span><span class="p">]</span>
            <span class="n">op</span> <span class="o">=</span> <span class="n">rotn</span><span class="p">[</span><span class="s2">&quot;op&quot;</span><span class="p">]</span>
            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">any</span><span class="p">([</span><span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">usedax</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span> <span class="k">for</span> <span class="n">usedax</span> <span class="ow">in</span> <span class="n">used_axes</span><span class="p">]):</span>
                <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_op_maps_IRBZ_to_self</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
                    <span class="n">face_center_found</span> <span class="o">=</span> <span class="kc">False</span>
                    <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
                        <span class="k">if</span> <span class="n">point</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="n">face_center_inds</span><span class="p">:</span>
                            <span class="n">cross</span> <span class="o">=</span> <span class="n">D</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">ginv</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
                            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">cross</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                                <span class="n">rot_boundaries</span> <span class="o">=</span> <span class="p">[</span><span class="n">cross</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">cross</span><span class="p">)]</span>
                                <span class="n">face_center_found</span> <span class="o">=</span> <span class="kc">True</span>
                                <span class="n">used_axes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
                                <span class="k">break</span>
                    <span class="k">if</span> <span class="ow">not</span> <span class="n">face_center_found</span><span class="p">:</span>
                        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;face center not found&quot;</span><span class="p">)</span>
                        <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
                            <span class="n">cross</span> <span class="o">=</span> <span class="n">D</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">ginv</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
                            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">cross</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                                <span class="n">rot_boundaries</span> <span class="o">=</span> <span class="p">[</span><span class="n">cross</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">cross</span><span class="p">)]</span>
                                <span class="n">used_axes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
                                <span class="k">break</span>
                    <span class="n">IRBZ_points</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_reduce_IRBZ</span><span class="p">(</span><span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">rot_boundaries</span><span class="p">,</span> <span class="n">g</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>

        <span class="k">for</span> <span class="n">rotn</span> <span class="ow">in</span> <span class="n">rpgdict</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;rotoinv-three-fold&quot;</span><span class="p">]:</span>
            <span class="n">ax</span> <span class="o">=</span> <span class="n">rotn</span><span class="p">[</span><span class="s2">&quot;axis&quot;</span><span class="p">]</span>
            <span class="n">op</span> <span class="o">=</span> <span class="n">rotn</span><span class="p">[</span><span class="s2">&quot;op&quot;</span><span class="p">]</span>
            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">any</span><span class="p">([</span><span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">usedax</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span> <span class="k">for</span> <span class="n">usedax</span> <span class="ow">in</span> <span class="n">used_axes</span><span class="p">]):</span>
                <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_op_maps_IRBZ_to_self</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
                    <span class="n">face_center_found</span> <span class="o">=</span> <span class="kc">False</span>
                    <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
                        <span class="k">if</span> <span class="n">point</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="n">face_center_inds</span><span class="p">:</span>
                            <span class="n">cross</span> <span class="o">=</span> <span class="n">D</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">ginv</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
                            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">cross</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                                <span class="n">rot_boundaries</span> <span class="o">=</span> <span class="p">[</span>
                                    <span class="n">cross</span><span class="p">,</span>
                                    <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">sqrtm</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">op</span><span class="p">),</span> <span class="n">cross</span><span class="p">),</span>
                                <span class="p">]</span>
                                <span class="n">face_center_found</span> <span class="o">=</span> <span class="kc">True</span>
                                <span class="n">used_axes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
                                <span class="k">break</span>
                    <span class="k">if</span> <span class="ow">not</span> <span class="n">face_center_found</span><span class="p">:</span>
                        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;face center not found&quot;</span><span class="p">)</span>
                        <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
                            <span class="n">cross</span> <span class="o">=</span> <span class="n">D</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">ginv</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
                            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">cross</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                                <span class="n">rot_boundaries</span> <span class="o">=</span> <span class="p">[</span><span class="n">cross</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">cross</span><span class="p">)]</span>
                                <span class="n">used_axes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
                                <span class="k">break</span>
                    <span class="n">IRBZ_points</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_reduce_IRBZ</span><span class="p">(</span><span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">rot_boundaries</span><span class="p">,</span> <span class="n">g</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>

        <span class="k">for</span> <span class="n">rotn</span> <span class="ow">in</span> <span class="n">rpgdict</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;three-fold&quot;</span><span class="p">]:</span>
            <span class="n">ax</span> <span class="o">=</span> <span class="n">rotn</span><span class="p">[</span><span class="s2">&quot;axis&quot;</span><span class="p">]</span>
            <span class="n">op</span> <span class="o">=</span> <span class="n">rotn</span><span class="p">[</span><span class="s2">&quot;op&quot;</span><span class="p">]</span>
            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">any</span><span class="p">([</span><span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">usedax</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span> <span class="k">for</span> <span class="n">usedax</span> <span class="ow">in</span> <span class="n">used_axes</span><span class="p">]):</span>
                <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_op_maps_IRBZ_to_self</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
                    <span class="n">face_center_found</span> <span class="o">=</span> <span class="kc">False</span>
                    <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
                        <span class="k">if</span> <span class="n">point</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="n">face_center_inds</span><span class="p">:</span>
                            <span class="n">cross</span> <span class="o">=</span> <span class="n">D</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">ginv</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
                            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">cross</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                                <span class="n">rot_boundaries</span> <span class="o">=</span> <span class="p">[</span><span class="n">cross</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">cross</span><span class="p">)]</span>
                                <span class="n">face_center_found</span> <span class="o">=</span> <span class="kc">True</span>
                                <span class="n">used_axes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
                                <span class="k">break</span>
                    <span class="k">if</span> <span class="ow">not</span> <span class="n">face_center_found</span><span class="p">:</span>
                        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;face center not found&quot;</span><span class="p">)</span>
                        <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
                            <span class="n">cross</span> <span class="o">=</span> <span class="n">D</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">ginv</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
                            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">cross</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                                <span class="n">rot_boundaries</span> <span class="o">=</span> <span class="p">[</span><span class="n">cross</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">cross</span><span class="p">)]</span>
                                <span class="n">used_axes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
                                <span class="k">break</span>
                    <span class="n">IRBZ_points</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_reduce_IRBZ</span><span class="p">(</span><span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">rot_boundaries</span><span class="p">,</span> <span class="n">g</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>

        <span class="k">for</span> <span class="n">rotn</span> <span class="ow">in</span> <span class="n">rpgdict</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;two-fold&quot;</span><span class="p">]:</span>
            <span class="n">ax</span> <span class="o">=</span> <span class="n">rotn</span><span class="p">[</span><span class="s2">&quot;axis&quot;</span><span class="p">]</span>
            <span class="n">op</span> <span class="o">=</span> <span class="n">rotn</span><span class="p">[</span><span class="s2">&quot;op&quot;</span><span class="p">]</span>
            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">any</span><span class="p">([</span><span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">usedax</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span> <span class="k">for</span> <span class="n">usedax</span> <span class="ow">in</span> <span class="n">used_axes</span><span class="p">]):</span>
                <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_op_maps_IRBZ_to_self</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
                    <span class="n">face_center_found</span> <span class="o">=</span> <span class="kc">False</span>
                    <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
                        <span class="k">if</span> <span class="n">point</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="n">face_center_inds</span><span class="p">:</span>
                            <span class="n">cross</span> <span class="o">=</span> <span class="n">D</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">ginv</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
                            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">cross</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                                <span class="n">rot_boundaries</span> <span class="o">=</span> <span class="p">[</span><span class="n">cross</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">cross</span><span class="p">)]</span>
                                <span class="n">face_center_found</span> <span class="o">=</span> <span class="kc">True</span>
                                <span class="n">used_axes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
                                <span class="k">break</span>
                    <span class="k">if</span> <span class="ow">not</span> <span class="n">face_center_found</span><span class="p">:</span>
                        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;face center not found&quot;</span><span class="p">)</span>
                        <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
                            <span class="n">cross</span> <span class="o">=</span> <span class="n">D</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">ginv</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
                            <span class="k">if</span> <span class="ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">cross</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                                <span class="n">rot_boundaries</span> <span class="o">=</span> <span class="p">[</span><span class="n">cross</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">cross</span><span class="p">)]</span>
                                <span class="n">used_axes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
                                <span class="k">break</span>
                    <span class="n">IRBZ_points</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_reduce_IRBZ</span><span class="p">(</span><span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">rot_boundaries</span><span class="p">,</span> <span class="n">g</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>

        <span class="k">return</span> <span class="p">[</span><span class="n">point</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">]</span>

    <span class="k">def</span> <span class="nf">_get_reciprocal_point_group_dict</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">recip_point_group</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
        <span class="n">PAR</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">]])</span>

        <span class="n">d</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s2">&quot;reflections&quot;</span><span class="p">:</span> <span class="p">[],</span>
            <span class="s2">&quot;rotations&quot;</span><span class="p">:</span> <span class="p">{</span>
                <span class="s2">&quot;two-fold&quot;</span><span class="p">:</span> <span class="p">[],</span>
                <span class="s2">&quot;three-fold&quot;</span><span class="p">:</span> <span class="p">[],</span>
                <span class="s2">&quot;four-fold&quot;</span><span class="p">:</span> <span class="p">[],</span>
                <span class="s2">&quot;six-fold&quot;</span><span class="p">:</span> <span class="p">[],</span>
                <span class="s2">&quot;rotoinv-three-fold&quot;</span><span class="p">:</span> <span class="p">[],</span>
                <span class="s2">&quot;rotoinv-four-fold&quot;</span><span class="p">:</span> <span class="p">[],</span>
                <span class="s2">&quot;rotoinv-six-fold&quot;</span><span class="p">:</span> <span class="p">[],</span>
            <span class="p">},</span>
            <span class="s2">&quot;inversion&quot;</span><span class="p">:</span> <span class="p">[],</span>
        <span class="p">}</span>

        <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">op</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">recip_point_group</span><span class="p">):</span>
            <span class="n">evals</span><span class="p">,</span> <span class="n">evects</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">eig</span><span class="p">(</span><span class="n">op</span><span class="p">)</span>

            <span class="n">tr</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">trace</span><span class="p">(</span><span class="n">op</span><span class="p">)</span>
            <span class="n">det</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linalg</span><span class="o">.</span><span class="n">det</span><span class="p">(</span><span class="n">op</span><span class="p">)</span>

            <span class="c1"># Proper rotations</span>
            <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">det</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">tr</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                    <span class="k">continue</span>
                <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">tr</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>  <span class="c1"># two-fold rotation</span>
                    <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span>
                        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">],</span> <span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                            <span class="n">ax</span> <span class="o">=</span> <span class="n">evects</span><span class="p">[:,</span> <span class="n">j</span><span class="p">]</span>
                    <span class="n">d</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;two-fold&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">({</span><span class="s2">&quot;ind&quot;</span><span class="p">:</span> <span class="n">i</span><span class="p">,</span> <span class="s2">&quot;axis&quot;</span><span class="p">:</span> <span class="n">ax</span><span class="p">,</span> <span class="s2">&quot;op&quot;</span><span class="p">:</span> <span class="n">op</span><span class="p">})</span>
                <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">tr</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>  <span class="c1"># three-fold rotation</span>
                    <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span>
                        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isreal</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">])</span> <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">absolute</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">]),</span> <span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                            <span class="n">ax</span> <span class="o">=</span> <span class="n">evects</span><span class="p">[:,</span> <span class="n">j</span><span class="p">]</span>
                    <span class="n">d</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;three-fold&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">({</span><span class="s2">&quot;ind&quot;</span><span class="p">:</span> <span class="n">i</span><span class="p">,</span> <span class="s2">&quot;axis&quot;</span><span class="p">:</span> <span class="n">ax</span><span class="p">,</span> <span class="s2">&quot;op&quot;</span><span class="p">:</span> <span class="n">op</span><span class="p">})</span>
                <span class="c1"># four-fold rotation</span>
                <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">tr</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                    <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span>
                        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isreal</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">])</span> <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">absolute</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">]),</span> <span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                            <span class="n">ax</span> <span class="o">=</span> <span class="n">evects</span><span class="p">[:,</span> <span class="n">j</span><span class="p">]</span>
                    <span class="n">d</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;four-fold&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">({</span><span class="s2">&quot;ind&quot;</span><span class="p">:</span> <span class="n">i</span><span class="p">,</span> <span class="s2">&quot;axis&quot;</span><span class="p">:</span> <span class="n">ax</span><span class="p">,</span> <span class="s2">&quot;op&quot;</span><span class="p">:</span> <span class="n">op</span><span class="p">})</span>
                <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">tr</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>  <span class="c1"># six-fold rotation</span>
                    <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span>
                        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isreal</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">])</span> <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">absolute</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">]),</span> <span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                            <span class="n">ax</span> <span class="o">=</span> <span class="n">evects</span><span class="p">[:,</span> <span class="n">j</span><span class="p">]</span>
                    <span class="n">d</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;six-fold&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">({</span><span class="s2">&quot;ind&quot;</span><span class="p">:</span> <span class="n">i</span><span class="p">,</span> <span class="s2">&quot;axis&quot;</span><span class="p">:</span> <span class="n">ax</span><span class="p">,</span> <span class="s2">&quot;op&quot;</span><span class="p">:</span> <span class="n">op</span><span class="p">})</span>

            <span class="c1"># Improper rotations</span>
            <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">det</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">tr</span><span class="p">,</span> <span class="o">-</span><span class="mi">3</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                    <span class="n">d</span><span class="p">[</span><span class="s2">&quot;inversion&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">({</span><span class="s2">&quot;ind&quot;</span><span class="p">:</span> <span class="n">i</span><span class="p">,</span> <span class="s2">&quot;op&quot;</span><span class="p">:</span> <span class="n">PAR</span><span class="p">})</span>
                <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">tr</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>  <span class="c1"># two-fold rotation</span>
                    <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span>
                        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">],</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                            <span class="n">norm</span> <span class="o">=</span> <span class="n">evects</span><span class="p">[:,</span> <span class="n">j</span><span class="p">]</span>
                    <span class="n">d</span><span class="p">[</span><span class="s2">&quot;reflections&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">({</span><span class="s2">&quot;ind&quot;</span><span class="p">:</span> <span class="n">i</span><span class="p">,</span> <span class="s2">&quot;normal&quot;</span><span class="p">:</span> <span class="n">norm</span><span class="p">,</span> <span class="s2">&quot;op&quot;</span><span class="p">:</span> <span class="n">op</span><span class="p">})</span>
                <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">tr</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>  <span class="c1"># three-fold rotoinversion</span>
                    <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span>
                        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isreal</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">])</span> <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">absolute</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">]),</span> <span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                            <span class="n">ax</span> <span class="o">=</span> <span class="n">evects</span><span class="p">[:,</span> <span class="n">j</span><span class="p">]</span>
                    <span class="n">d</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;rotoinv-three-fold&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">({</span><span class="s2">&quot;ind&quot;</span><span class="p">:</span> <span class="n">i</span><span class="p">,</span> <span class="s2">&quot;axis&quot;</span><span class="p">:</span> <span class="n">ax</span><span class="p">,</span> <span class="s2">&quot;op&quot;</span><span class="p">:</span> <span class="n">op</span><span class="p">})</span>
                <span class="c1"># four-fold rotoinversion</span>
                <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">tr</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                    <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span>
                        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isreal</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">])</span> <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">absolute</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">]),</span> <span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                            <span class="n">ax</span> <span class="o">=</span> <span class="n">evects</span><span class="p">[:,</span> <span class="n">j</span><span class="p">]</span>
                    <span class="n">d</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;rotoinv-four-fold&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">({</span><span class="s2">&quot;ind&quot;</span><span class="p">:</span> <span class="n">i</span><span class="p">,</span> <span class="s2">&quot;axis&quot;</span><span class="p">:</span> <span class="n">ax</span><span class="p">,</span> <span class="s2">&quot;op&quot;</span><span class="p">:</span> <span class="n">op</span><span class="p">})</span>
                <span class="c1"># six-fold rotoinversion</span>
                <span class="k">elif</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">tr</span><span class="p">,</span> <span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                    <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span>
                        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isreal</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">])</span> <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">absolute</span><span class="p">(</span><span class="n">evals</span><span class="p">[</span><span class="n">j</span><span class="p">]),</span> <span class="mi">1</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                            <span class="n">ax</span> <span class="o">=</span> <span class="n">evects</span><span class="p">[:,</span> <span class="n">j</span><span class="p">]</span>
                    <span class="n">d</span><span class="p">[</span><span class="s2">&quot;rotations&quot;</span><span class="p">][</span><span class="s2">&quot;rotoinv-six-fold&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">({</span><span class="s2">&quot;ind&quot;</span><span class="p">:</span> <span class="n">i</span><span class="p">,</span> <span class="s2">&quot;axis&quot;</span><span class="p">:</span> <span class="n">ax</span><span class="p">,</span> <span class="s2">&quot;op&quot;</span><span class="p">:</span> <span class="n">op</span><span class="p">})</span>

        <span class="k">return</span> <span class="n">d</span>

    <span class="k">def</span> <span class="nf">_op_maps_IRBZ_to_self</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">op</span><span class="p">,</span> <span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
        <span class="n">point_coords</span> <span class="o">=</span> <span class="p">[</span><span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">]</span>
        <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">point_coords</span><span class="p">:</span>
            <span class="n">point_prime</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">op</span><span class="p">,</span> <span class="n">point</span><span class="p">)</span>
            <span class="n">mapped_back</span> <span class="o">=</span> <span class="kc">False</span>
            <span class="k">for</span> <span class="n">checkpoint</span> <span class="ow">in</span> <span class="n">point_coords</span><span class="p">:</span>
                <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">point_prime</span><span class="p">,</span> <span class="n">checkpoint</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
                    <span class="n">mapped_back</span> <span class="o">=</span> <span class="kc">True</span>
                    <span class="k">break</span>
            <span class="k">if</span> <span class="ow">not</span> <span class="n">mapped_back</span><span class="p">:</span>
                <span class="k">return</span> <span class="kc">False</span>

        <span class="k">return</span> <span class="kc">True</span>

    <span class="k">def</span> <span class="nf">_reduce_IRBZ</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">IRBZ_points</span><span class="p">,</span> <span class="n">boundaries</span><span class="p">,</span> <span class="n">g</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
        <span class="n">in_reduced_section</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">IRBZ_points</span><span class="p">:</span>
            <span class="n">in_reduced_section</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
                <span class="n">np</span><span class="o">.</span><span class="n">all</span><span class="p">(</span>
                    <span class="p">[</span>
                        <span class="p">(</span>
                            <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">g</span><span class="p">,</span> <span class="n">boundary</span><span class="p">))</span> <span class="o">&gt;=</span> <span class="mi">0</span>
                            <span class="ow">or</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">g</span><span class="p">,</span> <span class="n">boundary</span><span class="p">)),</span> <span class="mi">0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">)</span>
                        <span class="p">)</span>
                        <span class="k">for</span> <span class="n">boundary</span> <span class="ow">in</span> <span class="n">boundaries</span>
                    <span class="p">]</span>
                <span class="p">)</span>
            <span class="p">)</span>

        <span class="k">return</span> <span class="p">[</span><span class="n">IRBZ_points</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">IRBZ_points</span><span class="p">))</span> <span class="k">if</span> <span class="n">in_reduced_section</span><span class="p">[</span><span class="n">i</span><span class="p">]]</span>

    <span class="k">def</span> <span class="nf">_get_orbit_labels</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">orbit_cosines_orig</span><span class="p">,</span> <span class="n">key_points_inds_orbits</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>

        <span class="n">orbit_cosines_copy</span> <span class="o">=</span> <span class="n">orbit_cosines_orig</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
        <span class="n">orbit_labels_unsorted</span> <span class="o">=</span> <span class="p">[(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points_inds_orbits</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">26</span><span class="p">)]</span>
        <span class="n">orbit_inds_remaining</span> <span class="o">=</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points_inds_orbits</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
        <span class="n">pop_orbits</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">pop_labels</span> <span class="o">=</span> <span class="p">[]</span>

        <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">orb_cos</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">orbit_cosines_copy</span><span class="p">):</span>
            <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">isclose</span><span class="p">(</span><span class="n">orb_cos</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">1</span><span class="p">],</span> <span class="mf">1.0</span><span class="p">,</span> <span class="n">atol</span><span class="o">=</span><span class="n">atol</span><span class="p">):</span>
                <span class="c1"># (point orbit index, label index)</span>
                <span class="n">orbit_labels_unsorted</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">i</span><span class="p">,</span> <span class="n">orb_cos</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">]))</span>
                <span class="n">pop_orbits</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
                <span class="n">pop_labels</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">orb_cos</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">])</span>

        <span class="n">orbit_cosines_copy</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_reduce_cosines_array</span><span class="p">(</span><span class="n">orbit_cosines_copy</span><span class="p">,</span> <span class="n">pop_orbits</span><span class="p">,</span> <span class="n">pop_labels</span><span class="p">)</span>
        <span class="n">orbit_inds_remaining</span> <span class="o">=</span> <span class="p">[</span><span class="n">i</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">orbit_inds_remaining</span> <span class="k">if</span> <span class="n">i</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">pop_orbits</span><span class="p">]</span>

        <span class="c1"># orbit_labels_unsorted already contains gamma orbit</span>
        <span class="k">while</span> <span class="nb">len</span><span class="p">(</span><span class="n">orbit_labels_unsorted</span><span class="p">)</span> <span class="o">&lt;</span> <span class="nb">len</span><span class="p">(</span><span class="n">orbit_cosines_orig</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1</span><span class="p">:</span>
            <span class="n">pop_orbits</span> <span class="o">=</span> <span class="p">[]</span>
            <span class="n">pop_labels</span> <span class="o">=</span> <span class="p">[]</span>
            <span class="n">max_cosine_value</span> <span class="o">=</span> <span class="nb">max</span><span class="p">([</span><span class="n">orb_cos</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span> <span class="k">for</span> <span class="n">orb_cos</span> <span class="ow">in</span> <span class="n">orbit_cosines_copy</span><span class="p">])</span>
            <span class="n">max_cosine_value_inds</span> <span class="o">=</span> <span class="p">[</span>
                <span class="n">j</span> <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">orbit_cosines_copy</span><span class="p">))</span> <span class="k">if</span> <span class="n">orbit_cosines_copy</span><span class="p">[</span><span class="n">j</span><span class="p">][</span><span class="mi">0</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="n">max_cosine_value</span>
            <span class="p">]</span>
            <span class="n">max_cosine_label_inds</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_max_cosine_labels</span><span class="p">(</span>
                <span class="p">[</span><span class="n">orbit_cosines_copy</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="n">max_cosine_value_inds</span><span class="p">],</span> <span class="n">key_points_inds_orbits</span><span class="p">,</span> <span class="n">atol</span>
            <span class="p">)</span>

            <span class="k">for</span> <span class="n">j</span><span class="p">,</span> <span class="n">label_ind</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">max_cosine_label_inds</span><span class="p">):</span>
                <span class="n">orbit_labels_unsorted</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">orbit_inds_remaining</span><span class="p">[</span><span class="n">max_cosine_value_inds</span><span class="p">[</span><span class="n">j</span><span class="p">]],</span> <span class="n">label_ind</span><span class="p">))</span>
                <span class="n">pop_orbits</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">max_cosine_value_inds</span><span class="p">[</span><span class="n">j</span><span class="p">])</span>
                <span class="n">pop_labels</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">label_ind</span><span class="p">)</span>
            <span class="n">orbit_cosines_copy</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_reduce_cosines_array</span><span class="p">(</span><span class="n">orbit_cosines_copy</span><span class="p">,</span> <span class="n">pop_orbits</span><span class="p">,</span> <span class="n">pop_labels</span><span class="p">)</span>
            <span class="n">orbit_inds_remaining</span> <span class="o">=</span> <span class="p">[</span>
                <span class="n">orbit_inds_remaining</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">orbit_inds_remaining</span><span class="p">))</span> <span class="k">if</span> <span class="n">j</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">pop_orbits</span>
            <span class="p">]</span>

        <span class="n">orbit_labels</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">key_points_inds_orbits</span><span class="p">))</span>
        <span class="k">for</span> <span class="n">tup</span> <span class="ow">in</span> <span class="n">orbit_labels_unsorted</span><span class="p">:</span>
            <span class="n">orbit_labels</span><span class="p">[</span><span class="n">tup</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span> <span class="o">=</span> <span class="n">tup</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>

        <span class="k">return</span> <span class="n">orbit_labels</span>

    <span class="k">def</span> <span class="nf">_reduce_cosines_array</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">orbit_cosines</span><span class="p">,</span> <span class="n">pop_orbits</span><span class="p">,</span> <span class="n">pop_labels</span><span class="p">):</span>

        <span class="k">return</span> <span class="p">[</span>
            <span class="p">[</span><span class="n">orb_cos</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">orb_cos</span><span class="p">))</span> <span class="k">if</span> <span class="n">orb_cos</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">pop_labels</span><span class="p">]</span>
            <span class="k">for</span> <span class="n">j</span><span class="p">,</span> <span class="n">orb_cos</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">orbit_cosines</span><span class="p">)</span>
            <span class="k">if</span> <span class="n">j</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">pop_orbits</span>
        <span class="p">]</span>

    <span class="k">def</span> <span class="nf">_get_max_cosine_labels</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">max_cosine_orbits_orig</span><span class="p">,</span> <span class="n">key_points_inds_orbits</span><span class="p">,</span> <span class="n">atol</span><span class="p">):</span>
        <span class="n">max_cosine_orbits_copy</span> <span class="o">=</span> <span class="n">max_cosine_orbits_orig</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
        <span class="n">max_cosine_label_inds</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">max_cosine_orbits_copy</span><span class="p">))</span>
        <span class="n">initial_max_cosine_label_inds</span> <span class="o">=</span> <span class="p">[</span><span class="n">max_cos_orb</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="k">for</span> <span class="n">max_cos_orb</span> <span class="ow">in</span> <span class="n">max_cosine_orbits_copy</span><span class="p">]</span>
        <span class="n">u</span><span class="p">,</span> <span class="n">inds</span><span class="p">,</span> <span class="n">counts</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">unique</span><span class="p">(</span><span class="n">initial_max_cosine_label_inds</span><span class="p">,</span> <span class="n">return_index</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">return_counts</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
        <span class="n">grouped_inds</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span>
                <span class="n">i</span>
                <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">initial_max_cosine_label_inds</span><span class="p">))</span>
                <span class="k">if</span> <span class="n">max_cosine_orbits_copy</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="n">max_cosine_orbits_copy</span><span class="p">[</span><span class="n">ind</span><span class="p">][</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
            <span class="p">]</span>
            <span class="k">for</span> <span class="n">ind</span> <span class="ow">in</span> <span class="n">inds</span>
        <span class="p">]</span>
        <span class="n">pop_orbits</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">pop_labels</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">unassigned_orbits</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">ind</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">inds</span><span class="p">):</span>
            <span class="k">if</span> <span class="n">counts</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
                <span class="n">max_cosine_label_inds</span><span class="p">[</span><span class="n">ind</span><span class="p">]</span> <span class="o">=</span> <span class="n">initial_max_cosine_label_inds</span><span class="p">[</span><span class="n">ind</span><span class="p">]</span>
                <span class="n">pop_orbits</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ind</span><span class="p">)</span>
                <span class="n">pop_labels</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">initial_max_cosine_label_inds</span><span class="p">[</span><span class="n">ind</span><span class="p">])</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">next_choices</span> <span class="o">=</span> <span class="p">[]</span>
                <span class="k">for</span> <span class="n">grouped_ind</span> <span class="ow">in</span> <span class="n">grouped_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]:</span>
                    <span class="n">j</span> <span class="o">=</span> <span class="mi">1</span>
                    <span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
                        <span class="k">if</span> <span class="n">max_cosine_orbits_copy</span><span class="p">[</span><span class="n">grouped_ind</span><span class="p">][</span><span class="n">j</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">initial_max_cosine_label_inds</span><span class="p">:</span>
                            <span class="n">next_choices</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">max_cosine_orbits_copy</span><span class="p">[</span><span class="n">grouped_ind</span><span class="p">][</span><span class="n">j</span><span class="p">][</span><span class="mi">1</span><span class="p">])</span>
                            <span class="k">break</span>
                        <span class="k">else</span><span class="p">:</span>
                            <span class="n">j</span> <span class="o">+=</span> <span class="mi">1</span>
                <span class="n">worst_next_choice</span> <span class="o">=</span> <span class="n">next_choices</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="nb">min</span><span class="p">(</span><span class="n">next_choices</span><span class="p">))</span>
                <span class="k">for</span> <span class="n">grouped_ind</span> <span class="ow">in</span> <span class="n">grouped_inds</span><span class="p">[</span><span class="n">i</span><span class="p">]:</span>
                    <span class="k">if</span> <span class="n">grouped_ind</span> <span class="o">!=</span> <span class="n">worst_next_choice</span><span class="p">:</span>
                        <span class="n">unassigned_orbits</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">grouped_ind</span><span class="p">)</span>
                <span class="n">max_cosine_label_inds</span><span class="p">[</span><span class="n">grouped_inds</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">worst_next_choice</span><span class="p">]]</span> <span class="o">=</span> <span class="n">initial_max_cosine_label_inds</span><span class="p">[</span>
                    <span class="n">grouped_inds</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">worst_next_choice</span><span class="p">]</span>
                <span class="p">]</span>
                <span class="n">pop_orbits</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">grouped_inds</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">worst_next_choice</span><span class="p">])</span>
                <span class="n">pop_labels</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">initial_max_cosine_label_inds</span><span class="p">[</span><span class="n">grouped_inds</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">worst_next_choice</span><span class="p">]])</span>

        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">unassigned_orbits</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
            <span class="n">max_cosine_orbits_copy</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_reduce_cosines_array</span><span class="p">(</span><span class="n">max_cosine_orbits_copy</span><span class="p">,</span> <span class="n">pop_orbits</span><span class="p">,</span> <span class="n">pop_labels</span><span class="p">)</span>
            <span class="n">unassigned_orbits_labels</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_orbit_labels</span><span class="p">(</span><span class="n">max_cosine_orbits_copy</span><span class="p">,</span> <span class="n">key_points_inds_orbits</span><span class="p">,</span> <span class="n">atol</span><span class="p">)</span>
            <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">unassigned_orbit</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">unassigned_orbits</span><span class="p">):</span>
                <span class="n">max_cosine_label_inds</span><span class="p">[</span><span class="n">unassigned_orbit</span><span class="p">]</span> <span class="o">=</span> <span class="n">unassigned_orbits_labels</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>

        <span class="k">return</span> <span class="n">max_cosine_label_inds</span>

<div class="viewcode-block" id="KPathLatimerMunro.LabelPoints"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathLatimerMunro.LabelPoints">[docs]</a>    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">LabelPoints</span><span class="p">(</span><span class="n">index</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Axes used in generating labels for Latimer-Munro convention</span>
<span class="sd">        &quot;&quot;&quot;</span>

        <span class="n">points</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
            <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span>
            <span class="p">[</span><span class="mf">1e-10</span><span class="p">,</span> <span class="mf">1e-10</span><span class="p">,</span> <span class="mf">1e-10</span><span class="p">],</span>
        <span class="p">]</span>

        <span class="k">return</span> <span class="n">points</span><span class="p">[</span><span class="n">index</span><span class="p">]</span></div>

<div class="viewcode-block" id="KPathLatimerMunro.LabelSymbol"><a class="viewcode-back" href="../../../pymatgen.symmetry.kpath.html#pymatgen.symmetry.kpath.KPathLatimerMunro.LabelSymbol">[docs]</a>    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">LabelSymbol</span><span class="p">(</span><span class="n">index</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Letters used in generating labels for Latimer-Munro convention</span>
<span class="sd">        &quot;&quot;&quot;</span>

        <span class="n">symbols</span> <span class="o">=</span> <span class="p">[</span>
            <span class="s2">&quot;a&quot;</span><span class="p">,</span>
            <span class="s2">&quot;b&quot;</span><span class="p">,</span>
            <span class="s2">&quot;c&quot;</span><span class="p">,</span>
            <span class="s2">&quot;d&quot;</span><span class="p">,</span>
            <span class="s2">&quot;e&quot;</span><span class="p">,</span>
            <span class="s2">&quot;f&quot;</span><span class="p">,</span>
            <span class="s2">&quot;g&quot;</span><span class="p">,</span>
            <span class="s2">&quot;h&quot;</span><span class="p">,</span>
            <span class="s2">&quot;i&quot;</span><span class="p">,</span>
            <span class="s2">&quot;j&quot;</span><span class="p">,</span>
            <span class="s2">&quot;k&quot;</span><span class="p">,</span>
            <span class="s2">&quot;l&quot;</span><span class="p">,</span>
            <span class="s2">&quot;m&quot;</span><span class="p">,</span>
            <span class="s2">&quot;n&quot;</span><span class="p">,</span>
            <span class="s2">&quot;o&quot;</span><span class="p">,</span>
            <span class="s2">&quot;p&quot;</span><span class="p">,</span>
            <span class="s2">&quot;q&quot;</span><span class="p">,</span>
            <span class="s2">&quot;r&quot;</span><span class="p">,</span>
            <span class="s2">&quot;s&quot;</span><span class="p">,</span>
            <span class="s2">&quot;t&quot;</span><span class="p">,</span>
            <span class="s2">&quot;u&quot;</span><span class="p">,</span>
            <span class="s2">&quot;v&quot;</span><span class="p">,</span>
            <span class="s2">&quot;w&quot;</span><span class="p">,</span>
            <span class="s2">&quot;x&quot;</span><span class="p">,</span>
            <span class="s2">&quot;y&quot;</span><span class="p">,</span>
            <span class="s2">&quot;z&quot;</span><span class="p">,</span>
            <span class="s2">&quot;Γ&quot;</span><span class="p">,</span>
        <span class="p">]</span>
        <span class="k">return</span> <span class="n">symbols</span><span class="p">[</span><span class="n">index</span><span class="p">]</span></div></div>
</pre></div>

            <div class="clearer"></div>
          </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">pymatgen 2020.7.3 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../../pymatgen.html" >pymatgen</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">pymatgen.symmetry.kpath</a></li> 
      </ul>
    </div>

    <div class="footer" role="contentinfo">
        &#169; Copyright 2011, Pymatgen Development Team.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
    </div>
<div class="footer">This page uses <a href="http://analytics.google.com/">
Google Analytics</a> to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.
<script type="text/javascript">
  (function() {
    var ga = document.createElement('script');
    ga.src = ('https:' == document.location.protocol ?
              'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    ga.setAttribute('async', 'true');
    document.documentElement.firstChild.appendChild(ga);
  })();
</script>
</div>

  </body>
</html>